Pregunta

Advanced Installer Version (8.9) I have developed a simple .Net Installer class. Its special feature is that provides a specific UI, based on *ini file. As far as I know Advanced Installer doesn't support such things. Correct me if I wrong! But that is not the point of my question. Depending on user choice, my installer class merges in registry a specific *.reg file. Here is the code I use for that aim:

Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName="regedit.exe";
proc.StartInfo.Arguments = " \"" + regFilePath + "\"";
proc.StartInfo.UseShellExecute = true;
proc.Start();

So if I have a sample.reg file of sort

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\NIKOLETA]
...

when I import my installer class in Windows installer (built in VS) - sample.reg is merged fine and NIKOLETA key appears under HKEY_CURRENT_USER\SOFTWARE. Unfortunately when installer class is imported under Advanced Installer - sample.reg is merged again, however NOT on desired place but NIKOLETA key appears under HKEY_USERS.DEFAULT\SOFTWARE. I am informed that Advanced Installer's default path for HKEY_USERS is HKEY_USERS.DEFAULT\Software[Manufacturer][ProductName]. But how and why it affects .Net installer classes? How could I surround that problem, so my *.reg files to be correctly merged? Thank you in anticipation!

¿Fue útil?

Solución

HKEY_USERS.DEFAULT it's actually the profile for the Local System account, so the registry entry could be redirected there if your custom action is set to run as deferred with no impersonation, which means it is set to run under the SYSTEM account with full admin rights.

Also, if you just want to create a certain registry entry based on a condition, you can create the entries from Registry page, and set install conditions on their components from Organization page.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top