Problem: I have compiled exe shortcut in Startup folder, but vps sits there and does nothing after reboot until I connect via RDP client (Administrator login happens automatically upon connection). RDP client will disconnect automatically every time connection is lost (like during a reboot), so there is a built in issue where despite rebooting, machine will not run script until I manually intervene. Even if I could somehow get the RDP client to constantly try to reconnect, I have too many vps to connect to all simultaneously, so solution needs to be on the Windows server side allowing the script to run regardless of login.
Troubleshooting: I have tried running shell:Common Startup to make startup item universal. This appears to have no effect. I have been reading up about task scheduler and the "Run whether user is logged in or not" option, but this raises new questions:
1) Am I on the wrong track here? Is there no way to do this without using the Task Manager?
2) Some reading has revealed issues that pop up if the item being run via Task Scheduler with "Run whether user is logged in or not" checked is interactive in any way (like can pop up dialogs) It would seem that a MS script would fall under this category, no? I came across the following statement in a discussion about unattended excel automation:
I have already contacted my vps providers to see if there is some solution that constantly attempts to reconnect when disconnected on their end (thus logging back in if logged out.). This is looking like a dead end, though, so the solution needs to be on the end of getting the script to launch regardless."Whenever you run a thing unattended under "Run whether user is logged on or not" there is no user interface. Meaning that the app runs with a hidden desktop, we cannot do anything about it. For example, we cannot dismiss an error message, or do anything else."
Hopefully I am overthinking this, and there is a simple best practice that allows me to run a script automatically upon startup regardless of login.