Overwrite registry values

Got a problem you cannot solve? Try here.
Post Reply
lbertoldi
Posts: 55
Joined: Wed Apr 07, 2010 7:19 am

Overwrite registry values

Post 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
Attachments
IA_Registry_Test.zip
(365.36 KiB) Downloaded 429 times
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Overwrite registry values

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
lbertoldi
Posts: 55
Joined: Wed Apr 07, 2010 7:19 am

Re: Overwrite registry values

Post by lbertoldi »

Thanks, it worked!
Just a question more, though. Does this invalidate the Windows logo certification in any way?
Thanks
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Overwrite registry values

Post by FrancescoT »

It can be used without problem.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply