Open a specific application on user login in windows
I am working on an application. My requirement is to open a specific application whenever a user logs in, so the workflow is something like this :
- I have a cloud machine setup at amazon ec2
- The machine is Microsoft windows server 2008
- Now I want to specify an application that will open whenever the user connects to Host server(via RDP).
- Also the application specified is the only one that can be used by the user in the Remote Desktop Services session.
How can I implement this ? If anybody has any idea please do suggest.
Solution 1:
Simplest way I can think of (and maybe the most secure) is to change the default shell to your program. It can be done in one of the following ways:
Set local GP: User configuration > Administrative templates > system > custom user interface > full path to your application.
Change registry key: [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon] “Shell”=”full path to your application” If the "shell" key doesn't exist then create it manually.
Just remember to disable the option of running programs redirected to you from the rdp client.
Solution 2:
If it's an internal machine and you don't have UAC enabled on the server you can simply add a shortcut to the program in the user's Startup folder of the Start menu.
If you do have UAC enabled it becomes a bit trickier. UAC blocks most programs in the Startup folder, but the user will still be notified on login that is has been blocked and can choose to start it either way. It's obviously a little less convenient this way, though.