![]() |
PSEXEC running batch file on remote PC |
Post Reply
|
| Author | |||
tonydotigr
Newbie
Joined: 13 November 2009 Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Topic: PSEXEC running batch file on remote PCPosted: 13 November 2009 at 7:48pm |
||
|
Hi all-
I'm trying to use PSEXEC to run a batch file on a remote PC. The command I'm using is psexec \\computer.domain.com - u username -i -d cmd /c \\computer\folder\program_copy.bat
I get cmd exited on computer with error code 0. I checked the PC and the batch file doesn't seem to run. Is there a way to see what is happening? Or am I missing something? Thanks.
|
|||
![]() |
|||
SvenBomwollen
Senior Member
Joined: 29 August 2008 Location: Germany Status: Offline Points: 1630 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 November 2009 at 11:57am |
||
|
Hello, tonydotigr.
About logging what happens: In case you can run your psexec commandline without the -d (detach) option, you might redirect the screen output of your psexec command line to a file.
In case you have to run your psexec commandline with the -d (detach) option, you should modify the command lines inside the script program_copy.bat in such a way that they write their screen output to a file. The file will be stored on the remote machine computer.domain.com in this case. Kind regards, SvenBomwollen Edited by SvenBomwollen - 14 November 2009 at 11:57am |
|||
![]() |
|||
mvaviya
Newbie
Joined: 05 October 2012 Location: India Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 October 2012 at 8:51am |
||
|
Can anyone guide me how can i write below syntax for *.bat file that accepts command line parameter (x_y_z) as input.
e.g. :
|
|||
|
Minesh Vaviya | Software Engineer
|
|||
![]() |
|||
upwithdawn
Newbie
Joined: 05 October 2012 Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 October 2012 at 1:51pm |
||
|
I can help with batch files but I'm afraid I don't understand the question ...
|
|||
![]() |
|||
mvaviya
Newbie
Joined: 05 October 2012 Location: India Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 October 2012 at 1:58pm |
||
|
Hi,
My Question here is i want to access a *.BAT file on remote server.
Need to be executed only on server.
This *.BAT file accepts a command line parameter(it is a BAT file that takes input).
So i require a syntax how i can execute that *.BAT on Server?
Thanks Edited by mvaviya - 05 October 2012 at 1:59pm |
|||
|
Minesh Vaviya | Software Engineer
|
|||
![]() |
|||
Caleb11
Newbie
Joined: 07 October 2012 Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 October 2012 at 10:31pm |
||
|
Im not sure if that would work, input redirection is something i have not tried, but i have read that it is not possible through PSEXEC ... is this right anyone? I read that it works but it bugged and can cause hung sessions ect... this may have been resolved in a later release ... i dont know.
|
|||
![]() |
|||
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |