Open a specific application on user login in windows

1

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 :

  1. I have a cloud machine setup at amazon ec2
  2. The machine is Microsoft windows server 2008
  3. Now I want to specify an application that will open whenever the user connects to Host server(via RDP).
  4. 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.

prateeak ojha

Posted 2013-10-16T07:54:06.227

Reputation: 113

Answers

2

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:

  1. Set local GP: User configuration > Administrative templates > system > custom user interface > full path to your application.

  2. 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.

EliadTech

Posted 2013-10-16T07:54:06.227

Reputation: 2 076

Thanks a lot I'll come back to you once this is implemented thank you – prateeak ojha – 2013-10-16T08:29:03.480

EliadTech :hey thanks a lot this works for me i just edit the registry part . but i am wondering is there any way to start a diffrent application(depends on user choice) for every user through same windows account application sorry my objective has diverted a bit after getting more details of my application – prateeak ojha – 2013-10-16T12:50:06.463

1You can either implement the choosing part in your application (but I suppose that not an option) or write a small hta (if you need GUI), vbs or batch that gives the options to choose from. Then point the reg key to them instead to your program. – EliadTech – 2013-10-16T13:04:33.187

EliadTech : Thanks for your suggestion hopefully this ll solve my task. can you guide me through some tutorials or link online which can guide me through a way note i already had designed a GUI all I need is a Batch script writing – prateeak ojha – 2013-10-16T13:08:51.877

In what format\tool have you designed your GUI? – EliadTech – 2013-10-16T13:36:29.210

I used hta only to for the gui :) – prateeak ojha – 2013-10-16T14:55:06.327

I don't understand something. You've created HTA menu so the user can choose what application to run, So where is the problem? Point the reg key to the mshta.exe, and add the HTA file as an argument. – EliadTech – 2013-10-17T05:07:04.677

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.

Oldskool

Posted 2013-10-16T07:54:06.227

Reputation: 654