I have a batch file named a.bat on the winserver2008 desktop.
This batch file writes only the SessionID (from the environment variable) to the local event log.
I want to execute it remotely using cmd (otherwise the name SessionName will not appear).
so i tried
c:\PsTools\psexec.exe \\<Server> -u test2 -p <Password> -i 2 cmd "c:\Users\test-2\Desktop\a"
or
c:\PsTools\psexec.exe \\<server> -u test2 -p <Password> -i 2 "cmd \"c:\Users\test-2\Desktop\a\"";exit
all of them simply open the terminal on the remote computer, but do not execute the package.
Any ides?
Regards,
source
share