Run Script / Batch file upon Remote Desktop Logon
Posted on 2013-02-07
I am having some issues on running scripts upon initial logon for remote desktop users when connecting to a windows 2008r2 server.
I run an application on there and most users connect using remote app, however this does not work on one or 2 users due to a problem in the software (so this is a software vendor issue) but lets not worry about that.
What I want is to be able to connect via remote desktop and for the software to run directly on the server (almost the same as remote app)
Before, I used to use a script in the Remote Desktop Connection saved file under programs and run the following:
Program path and file name:
Start in the following folder:
This would then run the file S1.vbs, which is as below:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Scripts\S1.bat", 0
Which runs the following batch file:
cd "c:\program files (x86)\S1 Manager"
Now, I am sure it is something to do with the local security policy on the server, I get the following error message:
Access is denied.
The initial program cannot be started:
Please consult help for more information.
it will not let the script call the execute file remotley. I cannot do this with a standard user or domain admin