psexec problem with -i parameter

G

Gunnar_Frenzel

Hello,
I have two WinXP systems both running in a virtual machine. I want to
start a batch file file on Machine1 started by a psexec call from
Machine2.
The command is:
psexec \\machine1 -u User -p Password -i -w "C:\Batch_Files" "C:
\Batch_Files\Task.bat"
Which is working properly when Machine1 is fresh rebooted. As soon as
a user has logged on to Machine1 using Remote Desktop Connection the
command returns "Invalid parameter" when I remove the -i parameter
only it is working properly so this parameter seem to cause the
problem. The problem occurs when no user is logged in to Machine1
anymore, too. So as long as no user has ever connected to Machine1 via
Remote Desktop after reboot everything works fine and after the first
Log In/Log off the invalid parameter error occurs.
Can anyone tell me how to solve this problem? The problem is that the
batch file on Machine1 is calling a Powershell Skript which hangs when
the batch is not started with -i in psexec call.
Best regards,
Gunnar
 
A

Adam Leinss

(e-mail address removed) wrote in @y18g2000yqn.googlegroups.com:
Hello,
I have two WinXP systems both running in a virtual machine. I want to
start a batch file file on Machine1 started by a psexec call from
Machine2.
The command is:
psexec \\machine1 -u User -p Password -i -w "C:\Batch_Files" "C:
\Batch_Files\Task.bat"
Which is working properly when Machine1 is fresh rebooted. As soon as
a user has logged on to Machine1 using Remote Desktop Connection the
command returns "Invalid parameter" when I remove the -i parameter
only it is working properly so this parameter seem to cause the
problem.


Do you need -i? I'm guessing the problem is that -i assumes running the
process in the console session and the console session is locked when you
RDP into Windows XP.

Adam
 
G

Gunnar_Frenzel

Do you need -i?  I'm guessing the problem is that -i assumes running the
process in the console session and the console session is locked when you
RDP into Windows XP.

Yes I need the parameter. When calling the psece commands no user is
logged on the target machine. So there's no RDP connection while
trying to use psexec. It looks like creating a RDP connection even if
its terminated then via Log Off somehow mess up the system to prevent
later psexec -i calls from working.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top