Notes below.... 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Chris Wagner
> Sent: Thursday, January 26, 2006 8:06 PM
> To: perl-win32-admin@listserv.ActiveState.com
> Subject: Re: win32: remote command question
> 
> At 01:33 AM 1/27/2006 +0000, Steven Satelle wrote:
> >I have a question, is there a method of runnng commands on a remote 
> >machine (a type of silent install) which has a minimal gui, 
> yet display 
> >nothing on the remote machine, or (I doubt it) revert them 
> back to the 
> >calling box?
> 
> I guess u can do it with WMI but I don't know how to do it.  
> Download Scriptomatic and play around with that.
> 

Here's the docs..

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/
wmi/win32_trustee.asp

VB Primer..  Pretty easy to translate.  I was using it to automate the
showpriv.exe command-line on the target box.

You need to copy a file to the target box if it is not on the target
box.

strComputer = "."
set objWMIService = Getobject("winmgmts://" & strComputer &
"/root/cimv2")

objWMIService.Security_.AuthenticationLevel = 3
objWMIService.Security_.ImpersonationLevel = 4

Set objProcess = objWMIService.Get("Win32_Process")

Set objProgram =
objProcess.Methods_("Create").InParameters.SpawnInstance_

strExe = "c:\showpriv.exe seInteractiveLogonRight> C:\this.txt"
objProgram.CommandLine = strExe
Set strShell = objWMIService.ExecMethod("Win32_Process", "Create",
objProgram)
WScript.Echo "RTN = " & strShell.ReturnValue

> 
> 
> 
> --
> REMEMBER THE WORLD TRADE CENTER         ---=< WTC 911 >=--
> "...ne cede malis"
> 
> 00000100
> 
> _______________________________________________
> Perl-Win32-Admin mailing list
> Perl-Win32-Admin@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
> 

_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to