E
ejmichaud
Can anyone help me with implementing the best (i.e. cleanest) method
in which to have a program run at logon for each user. The key is to
start the program, allow the program to be displayed (it's a dialog
with status information), let the program complete, all before showing
the explorer shell to the end user.
The following common methods for starting programs at logon don't meet
the requirements because the shell will be shown before the program
has finished:
HKLM\Software\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
Couple of options I found, but don't particularly like:
1) Using HKLM\Active Setup\Installed Components\<APP>\StubPath
2) Configuring a Logon Script in the local group policy and set the
logon scripts to run synchronously
3) Modify the HKLM\Software\Micrsoft\Windows NT\CurrentVersion\Winlogon
\Userinit and have my custom app call userinit.exe
My Concerns with the above options
1) Not as clean as I would like. During run, shows "Applying Personal
Settings", need to be sure to remove the HKCU\Active Setup\Installed
Components\<APP>\Version after each successful run.
2) This solution is perfect except for I don't know if it's possible
to pragmatically (VIA an installer) add a logon script to the local
group policy. Need to have an installer do the work at application
install time.
3) Cleanest approach but I don't know if this has the potential to
cause any problems??
Questions
1) Any other options I have overlooked?
2) Anyone know if it's possible to pragmatically add a logon script to
the local security policy?
3) Anyone know of any issues with replacing the Userinit with my
custom app and having the custom app call userinit?
Thanks for your time
Eric
in which to have a program run at logon for each user. The key is to
start the program, allow the program to be displayed (it's a dialog
with status information), let the program complete, all before showing
the explorer shell to the end user.
The following common methods for starting programs at logon don't meet
the requirements because the shell will be shown before the program
has finished:
HKLM\Software\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
Couple of options I found, but don't particularly like:
1) Using HKLM\Active Setup\Installed Components\<APP>\StubPath
2) Configuring a Logon Script in the local group policy and set the
logon scripts to run synchronously
3) Modify the HKLM\Software\Micrsoft\Windows NT\CurrentVersion\Winlogon
\Userinit and have my custom app call userinit.exe
My Concerns with the above options
1) Not as clean as I would like. During run, shows "Applying Personal
Settings", need to be sure to remove the HKCU\Active Setup\Installed
Components\<APP>\Version after each successful run.
2) This solution is perfect except for I don't know if it's possible
to pragmatically (VIA an installer) add a logon script to the local
group policy. Need to have an installer do the work at application
install time.
3) Cleanest approach but I don't know if this has the potential to
cause any problems??
Questions
1) Any other options I have overlooked?
2) Anyone know if it's possible to pragmatically add a logon script to
the local security policy?
3) Anyone know of any issues with replacing the Userinit with my
custom app and having the custom app call userinit?
Thanks for your time
Eric