Page 1 of 1

Overwrite registry values

Posted: Tue Oct 30, 2012 8:21 am
by lbertoldi
Hi there, I thought I was done with my setup but I got a new issue to solve.
I use the same setup package to install my application or to upgrade it. The upgrade process doesnt uninstall the old application, it just overwrites it.
One of the dialogs collects some information that is stored in the registry.
Problem is, if the user changes this information in an upgrade install, the registry keys are not updated.
I tried deleting the key prior to writing it, but this will not add the key at all (I guess the delete statement is buffered and deletes the key after it is created?)
I am attaching a sample project: install once, change the registry value in the project, build and install again. The key should be the old one.
Any suggestion?
Thanks

Re: Overwrite registry values

Posted: Tue Oct 30, 2012 12:32 pm
by FrancescoT
Dear User,

you should use NATIVE ENGINE for that otherwise any write registry operation is deferred to Apply Install execution.

Code: Select all

Set Variable NATIVE_ENGINE to TRUE
Write Registry Key HKLM\\, 
Set Variable NATIVE_ENGINE to FALSE
Using the above code, the registry key will be stored immediatelly.

Hope this helps you.

Regards

Re: Overwrite registry values

Posted: Wed Oct 31, 2012 4:35 am
by lbertoldi
Thanks, it worked!
Just a question more, though. Does this invalidate the Windows logo certification in any way?
Thanks

Re: Overwrite registry values

Posted: Wed Oct 31, 2012 10:48 am
by FrancescoT
It can be used without problem.

Regards