Open a specific application on user login in windows

7,349

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:

  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.

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.

Share:
7,349

Related videos on Youtube

prateeak ojha
Author by

prateeak ojha

Updated on September 18, 2022

Comments

  • prateeak ojha
    prateeak ojha over 1 year

    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
    prateeak ojha over 10 years
    Thanks a lot I'll come back to you once this is implemented thank you
  • prateeak ojha
    prateeak ojha over 10 years
    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
  • EliadTech
    EliadTech over 10 years
    You 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.
  • prateeak ojha
    prateeak ojha over 10 years
    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
  • EliadTech
    EliadTech over 10 years
    In what format\tool have you designed your GUI?
  • prateeak ojha
    prateeak ojha over 10 years
    I used hta only to for the gui :)
  • EliadTech
    EliadTech over 10 years
    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.