I have a batch file running on Windows 7 x86. I am trying to script a connection to a share and then once that is done to execute an app.
net use \\appserver001\mycompany.ptshare\OPS /user:geek xyz!@# /persistent:yes
echo %errorlevel%
if errorlevel 2 goto message
if errorlevel 1 goto message
start "" "\\appserver001\mycompany.ptshare\OPS\OPSapp.exe"
echo %errorlevel%
if errorlevel 2 goto message
if errorlevel 1 goto message
goto end
:message
cls
echo ERROR IN CONNECTING TO SERVER
:end
The NET USE connection is made as the command window says "The command completed successfully". Then when it reaches the line to execute the app I get a pop-up message "Invalid location for program!".
I swear I have done his before but cant figure out why it will not run my app.