Re: Run remote process as currently logged in user
From: TwistedPair (twistedpair_at_mail.com)
Date: 08/05/04
- Next message: Gareth Harrison: "Re: Programmatically change permissions on folder in windows"
- Previous message: TwistedPair: "Re: Run remote process as currently logged in user"
- In reply to: TwistedPair: "Re: Run remote process as currently logged in user"
- Next in thread: Gareth Harrison: "Re: Run remote process as currently logged in user"
- Reply: Gareth Harrison: "Re: Run remote process as currently logged in user"
- Reply: Torgeir Bakken \(MVP\): "Re: Run remote process as currently logged in user"
- Messages sorted by: [ date ] [ thread ]
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
>
>
- Next message: Gareth Harrison: "Re: Programmatically change permissions on folder in windows"
- Previous message: TwistedPair: "Re: Run remote process as currently logged in user"
- In reply to: TwistedPair: "Re: Run remote process as currently logged in user"
- Next in thread: Gareth Harrison: "Re: Run remote process as currently logged in user"
- Reply: Gareth Harrison: "Re: Run remote process as currently logged in user"
- Reply: Torgeir Bakken \(MVP\): "Re: Run remote process as currently logged in user"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|