Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Execute a BAT File in a remote machine

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 19-02-2007
Juanjillo
 
Posts: n/a
Execute a BAT File in a remote machine

Hi,

I have a bat file in server2.
Im 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



Reply With Quote
  #2  
Old 20-02-2007
Jeffery Hicks
 
Posts: n/a
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.
> Im 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
Reply With Quote
  #3  
Old 20-02-2007
Juanjillo
 
Posts: n/a
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.
>> Im 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


Reply With Quote
  #4  
Old 20-02-2007
Jack Doyle
 
Posts: n/a
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

Reply With Quote
  #5  
Old 23-02-2007
Juanjillo
 
Posts: n/a
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


Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 11:48 PM.