|
| ||||||||||
| Tags: bat, execute, machine |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Execute a BAT File in a remote machine
I have a bat file in server2. I´m on server1 and i want to execute remotly this bat file pp.bat I execute a vbs file with this code: strComputer = "pc_name" Set objWMIService = GetObject ("winmgmts:\\" & strComputer & "\root\cimv2") errReturn = objWMIService.Create ("c:\pp.bat", Null, Null, intProcessID) Thank you. -- Agures |
|
#2
| |||
| |||
| Re: Execute a BAT File in a remote machine
On Mon, 19 Feb 2007 18:50:38 +0100, Juanjillo wrote: > Hi, > > I have a bat file in server2. > I´m on server1 and i want to execute remotly this bat file pp.bat > > I execute a vbs file with this code: > > strComputer = "pc_name" > Set objWMIService = GetObject ("winmgmts:\\" & strComputer & > "\root\cimv2") > errReturn = objWMIService.Create ("c:\pp.bat", Null, Null, > intProcessID) > > > Thank you. Honestly, the fastest and easiest way to do that is to use PSEXEC and it's free. -- Jeffery Hicks SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com VBScript & Windows PowerShell Training - www.ScriptingTraining.com/classes.asp Windows PowerShell? - www.SAPIENPress.com/powershell.asp blog: http://blog.SAPIEN.com blog: http://jdhitsolutions.blogspot.com |
|
#3
| |||
| |||
| Re: Execute a BAT File in a remote machine
Thank You very much. I try this. Best reggards. > On Mon, 19 Feb 2007 18:50:38 +0100, Juanjillo wrote: > >> Hi, >> >> I have a bat file in server2. >> I´m on server1 and i want to execute remotly this bat file pp.bat >> >> I execute a vbs file with this code: >> >> strComputer = "pc_name" >> Set objWMIService = GetObject ("winmgmts:\\" & strComputer & >> "\root\cimv2") >> errReturn = objWMIService.Create ("c:\pp.bat", Null, Null, >> intProcessID) >> >> >> Thank you. > > Honestly, the fastest and easiest way to do that is to use PSEXEC and it's > free. -- Agures |
|
#4
| |||
| |||
| Re: Execute a BAT File in a remote machine
Another good tool for this is BeyondExec (http://www.beyondlogic.org/ solutions/remoteprocess/BeyondExec.htm). Jack Doyle, Systems Engineer ScriptLogic Corporation http://www.scriptlogic.com |
|
#5
| |||
| |||
| Re: Execute a BAT File in a remote machine
> Another good tool for this is BeyondExec (http://www.beyondlogic.org/ > solutions/remoteprocess/BeyondExec.htm). > > Jack Doyle, Systems Engineer > ScriptLogic Corporation > http://www.scriptlogic.com Thank You very much. -- Agures |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Execute a BAT File in a remote machine" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running a batch file from a remote machine in a VB code | Radhu | Software Development | 1 | 14-10-2011 04:54 PM |
| Execute a batch file on a remote computer? | Chris D | Windows Server Help | 6 | 20-01-2011 10:09 PM |
| Running an MSI file on a remote machine | brock_griffin@hotmail.com | Windows Server Help | 6 | 09-07-2010 04:36 AM |
| need to execute 2 KB article security patch file to the remote computers | srikesavan9 | Windows Software | 1 | 03-10-2009 04:25 PM |
| Execute a batch file on remote host | Hulicat | Windows Server Help | 5 | 20-06-2009 01:35 AM |