As per my app requirement, I need that application should auto launch for every log-in and log-off (i.e. for every user it should launch automatically.)

I will be using RunOnce for this.I have never used this key.I know we have to create entry for this in : HKCU\Software\Microsoft\Windows\CurrentVersion\...do I need to make same entry in HKLM as well, does it work the way Active Setup works.Comparing HKLm and HKCU or is it like entry in HKCU would be fine.

Also how do I give the exe name in value.

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

Hey Deepali,

 

What is the issue in using Active Setup if you require the same functionality.

Runonce will only run for Admin users and not for normal users.. Well that is what I have learnt.. Not sure if it still holds true.

 

Cheers,

Piyush

Answered 05/21/2013 by: piyushnasa
Red Belt

  • Hi Piyush...never used RunOnce...so just wanted to make sure before I do so...as it is a real trouble testing a package in our environment....If it runs only for Admin users....then its of no use....You are right...I can use Active Setup in this case...will give it a try..Thanks :))
  • anytime :)
Please log in to comment
1

You could try to use local logon and logoff scripts with 'if member of' parts.

Answered 05/28/2013 by: mduiker
Senior Yellow Belt

Please log in to comment
This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.

0

>add it to the default users hive.
...remembering that that is only valid for new users local to the machine, not domain users.

>Th requirement is that it should run only on first launch of every user.If he logs in for the second time, this should not auto launch the app
Sooooooooooooooooooooooo...Active Setup, then!

Answered 05/21/2013 by: VBScab
Red Belt

Please log in to comment
0

Use this instead, it will start for all users who log on, and save you from populating something into HKCU.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
You dont need to make this entry in HKCU, only in HKLM.

 

You only use ActiveSetup when you dont have a entrypoint and you need to inject something into HKCU. And to answer your last question, its not like ActiveSetup, Windows will just reads that key location and starts the app required in the registry key value.

Answered 05/20/2013 by: rileyz
Red Belt

  • Thanks for ur reply.....I think Run key would work everytime a user logs-in.Th requirement is that it should run only on first launch of every user.If he logs in for the second time, this should not auto launch the app.
  • Ah ok, dont use my suggestion then, will just annoy your users a lot.
    Humm, Im not sure if RunOnce will do what you want it to do as it will be removed once it has run.

    What is your requirement, why do you need it to run for each user? If you let us know we can give you better answers - I have a feeling you may need ActiveSetup (yuck) but you could get away with a EntryPoint.
  • Yes...I think Active setup would work :)
Please log in to comment
0

RunOnce will only run the program for the first user who logs in after the install and it should be a HKLM key. This is usually used to configure an app after install. Once it has run the key is deleted. Make sure the permissions on the key are set correctly otherwise the key won't be deleted by a non-admin logon. If you want it to run every time a user logs on then use Run instead of RunOnce and, again, it needs to be an HKLM key. If you use HKCU it only runs for that specific user.

To set it up you use a name (any name is OK) set the type to be REG_SZ or REG_EXPAND_SZ if you have envionment variables in the path, and the value is the program name. e.g.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]

"My Program" = "C:\\My Folder\\My Program.exe"

 

Answered 05/20/2013 by: olditguy
Second Degree Blue Belt

Please log in to comment
0

If you are talking when it create the profile for a new user add it to the default users hive.

Answered 05/20/2013 by: SMal.tmcc
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity