Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Remote Process run

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,36998
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Remote Process run
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Remote Process run - 8/15/2006 4:52:43 AM   
  Tnguyen81

 

Posts: 7
Score: 0
Joined: 8/8/2006
Status: offline
I'm trying to run a remote process to launch something on a remote PC.  I have two questions..
1) is there anyway to run the process without the hidden window?  I think that would be nice. 
2) also, in the script I am trying to launch something a little more complicated like a cmd file to run an install of an app.  Is that possible?  I get error codes 2 and 9 when I use the UNC path and the mapped path.

I read about utilities but my company is going altiris so i dont want to try to purcahse something that we wont use later.

Thanks

dim strusername
Dim process
Dim result
Dim colcomputer
Dim objwmiservice
strusername = Inputbox ("Enter in a PC name to find out who's logged on.")
If strusername = "" Then
MsgBox "Application Terminated."
wscript.quit
end If
Set process = GetObject("winmgmts:{impersonationLevel=impersonate }!\\" _
& strusername & "\root\cimv2:Win32_Process")
result = process.Create("notepad.exe",Null,Null,processid)
WScript.Echo result
Set objWMIService = GetObject("winmgmts:" _
   & "{impersonationLevel=impersonate}!\\" _
   & strusername & "\root\cimv2")
Set colcomputer = objWMIService.ExecQuery _
   ("Select * from Win32_ComputerSystem")

For Each objComputer in colComputer
   Wscript.Echo "User Name = " & objComputer.UserName _
       & vbNewLine & "Computer Name = " & objComputer.Name
WScript.Echo objComputer.UserName
Next
 
 
Post #: 1
 
 RE: Remote Process run - 8/15/2006 5:02:42 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
Hiya,

I like to use PsExec from SysInternals to launch something remote and hidden....

S.

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to Tnguyen81)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Remote Process run Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts