Click here to Skip to main content
15,889,627 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,
I need to open my program after it has been installed. I do this in the AfterInstall method. By starting a new process.
Process p = new Process();
                    p.StartInfo.FileName = "filepath";
                    p.Start();

The issue is that the program needs to get/set a value in the HKEY_CURRENT_USER registry but it is instead is looking in the HKEY_USERS registry. This is because the process starts under "NT AUTHORITY\SYSTEM". I have no of getting the users password so as far as I can tell I can't start the process as a different user. Everything works fine when the program is started normally, it's only an issue when opened by the Custom Action. Any idea's on how I can run it differently or get in to the correct registry?
Posted

1 solution

Use the Active Directory of the Current Logged in User...

once you can do this the rest should be straight forward...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900