psexec using which login?
Posted on 2011-03-16
I use the following to deploy code to my production environment.
user, password, nas_server, instance are all variables.
start c:\windows\psexec -s \\%%a -u %user% -p %password% /c "\\%nas_server%\nas\deploy\remotedeployscript.bat" %instance% %nas_server%
This works. However, it will try to use my local login before it uses what is in my script.
I log into my computer as COMPANY\bob. My script uses, PRODUCTION\automate. psexec will try to login to the remote server as COMPANY\bob before trying PRODUCTION\automate. COMPANY\bob doesn't exist on the remote computer.
Is there something wrong with my psexec switches?