This content has been marked as final. Show 2 replies
you directly try to start the "1.bat". The "1.bat" is only a text file which is normally associated with cmd.exe to be executed as a batch file.
Neither the RunAs-command nor the Execute-command know anything about this association and try to execute the 1.bat as if it was a self executable file.
So you have to run 1.bat with "cmd.exe /C 1.bat".
This starts the cmd.exe with 1.bat as parameter which is interpreted by cmd.exe as batch file and therefore is executed as batch file.
Thanks for the help M. Metzger. This solved the problem