A colleague has a batch script program which needs to to run on a Windows Server in console mode, so that it has access to a Windows interactive session. The server is rebooted at regular intervals automatically (there's an unrelated closed-source application that runs on this machine that we have no control over). After a reboot he wants to automatically start a Windows interactive session and have this script run, plus the service needs to also have access to network resources (CIFS drives, in particular).
Here's what we've tried so far:
- Start as Windows service. This failed, since a Windows service can either have access to interactive session or to network resources, but never both.
- Used Microsoft management console to add the script to run at startup, however this did not work.
- Used an HKLM registry key to start to run this script, however it only gets started when we manually open a remote desktop session on the server.
- Creating a scheduled task. The program invoked did not have access to interactive windows session.
Any other suggestions? (Or maybe he missed something when he set up one of these suggestions?)