CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2010
    Posts
    4

    Installer and registry values

    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();

  2. #2
    Join Date
    Feb 2010
    Posts
    4

    Re: Installer and registry values

    No ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured