Updating registry - HKLM\...\Winlogon\Shell during installation?

Oct 6 2008 2:15 AM

Hi everyone,

it has been a while since I did any development in .NET and I wonder if it's possible to update the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft NT\CurrentVersion\Winlogon\Windows\Shell" key in the windows (XP) registry within a setup and deployment project? The reason to do this is that the application I'm developing is a "kiosk application" that needs to be the started once the user logons.

I have created code similiar to the one below and it works fine if I run it as a standalone exe file, but as soon as I try to run it as a custom action in my deployment project it won't execute. I guess it may depend on reduced security access when running through the installer?

RegistryKey key = Registry.LocalMachine.OpenSubKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft NT\CurrentVersion\Winlogon\Windows", true);
key.SetValue("Shell", "Whatever.exe", RegistryValueKind.String);

Any help much appreciated!
Cheers Christian


Answers (1)