Okay, so I'm making an installer with custom actions. On the commit even I have it where it creates a share and does some other stuff along with creating registry values to run the program whenever a user logs in.

For some reason though, whenever I run the compiled installer, it will not enter the key values into the registry. If, however, I take my same code and use it in a test form or something, it creates the keys. I have to run the app as admin to do it, but it works. Running the installer as admin still doesn't do it though.

Here's the code I use in the commit event for the registries.

Code:
//set registry values so that app starts on login for all users
            RegistryKey rkey = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", true);
            rkey.SetValue("MNet Update Manager", savedState["TargetDir"] + "MeasureNet Update Manager.exe" );
            rkey.Close();