Re: Run remote process as currently logged in user

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: TwistedPair (twistedpair_at_mail.com)
Date: 08/05/04


Date: Thu, 5 Aug 2004 12:34:46 -0700

That didn't make sense, let me try that again:
I know for a fact that you can get stuff to run as the logged in user. I
know this because there are options in group policy that allow you to do
this during login. If you have the username, and the credentials, there
must be some way to get something to run as the currently logged in user.

Thanks,
Pair

"TwistedPair" <twistedpair@mail.com> wrote in message
news:%23F2CKHyeEHA.692@TK2MSFTNGP10.phx.gbl...
> Thank you very much for your help, but doesn't this require their password
> to run? Suppose you don't have that? Is there any way to get it to run
as
> the user, or at least on their desktop without the username and password?
>
> Thanks,
> Pair
> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
> news:%23BRfgCyeEHA.1724@TK2MSFTNGP10.phx.gbl...
> > TwistedPair wrote:
> >
> > > Hi all,
> > > The following can launche notepad on a remote machine. But it will
run
> with
> > > whatever credentials I ran it from. How do I get it to run with
> credentials
> > > of the currently logged in user? Any ideas?
> > > strComputer = "remote machine"
> > > Set objWMIService = GetObject("winmgmts:" _
> > > & "{impersonationLevel=impersonate}!\\" & strComputer _
> > > & "\root\cimv2:Win32_Process")
> > >
> > > Error = objWMIService.Create("notepad.exe", null, _
> > > null, intProcessID)
> > > If Error = 0 Then
> > > Wscript.Echo "Notepad was started with a process ID of " _
> > > & intProcessID & "."
> > > Else
> > > Wscript.Echo "Notepad could not be started due to error " _
> > > & Error & "."
> > > End If Thanks,Pair
> > Hi
> >
> >
> > You can connect with explicit user credentials (e.g. the
> > local Administrator user on the remote computer) using
> > SWbemLocator.ConnectServer.
> >
> > IWbemLocator::ConnectServer
> >
>
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/iwbemlocator_connectserver.asp
> >
> > Subject: Login with explicit username and password
> > Newsgroups: microsoft.public.win32.programmer.wmi
> > http://groups.google.com/groups?th=2b5bcad76f5debaa
> >
> > Subject: ImpersoantionLevel other than impersonate
> > Newsgroups: microsoft.public.scripting.wsh
> > http://groups.google.com/groups?th=89ff50603f12dcfb
> >
> >
> >
> > --
> > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> > Administration scripting examples and an ONLINE version of
> > the 1328 page Scripting Guide:
> > http://www.microsoft.com/technet/scriptcenter/default.mspx
>
>



Relevant Pages

  • RE: Help Needed configuring Samba on Webserver
    ... username and password, and it reported successfully joining the domain ... Passwd: files windbind ... I logged in as the jkocher user on a windows xp pro station that is part ... Supplying the credentials for jkocher (the logged in ...
    (Fedora)
  • Re: Connecting to a File Server
    ... to retreive a password and username saved in the credential manager? ... Using 4.2 we were able to save the credentials and then pass 0 to username ... BOOL SaveDefaultCredentials(TCHAR *szUser, TCHAR *szPassword, TCHAR ... BOOL RetValue = FALSE; ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Stange access problem
    ... Merv Porter [SBS-MVP] ... "Windows cannot bind to local domain (invalid credentials)" ... logging on with his correct username and password. ... One oddity is the username that pops up is not his 'domain/username'. ...
    (microsoft.public.backoffice.smallbiz)
  • Re: Stange access problem
    ... "Windows cannot bind to local domain (invalid credentials)" ... network resource accesses are requiring his credentials. ... on with his correct username and password. ... One oddity is the username that pops up is not his 'domain/username'. ...
    (microsoft.public.backoffice.smallbiz)
  • Re: POP through ISA
    ... This may be a problem with the authenication. ... If your mailbox alias is ... then you need to enter the username ... E-mail alias is Jim.McBee, my credentials for ...
    (microsoft.public.exchange.admin)