We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mheckmann
Posts: 74
Joined: Wed Apr 20, 2011 6:24 pm

prevent key from being uninstalled / multiple versions

Hello,

I don't really understand how to do this correctly:

I have my software as a 32bit and a 64 bit installation.
Both create a Registry key for the file extension to add OpenWith functionality and such.
Now I understand I can set the keys to "permanent" to prevent them from being uninstalled or overwritten when I install one of the 2 packages after the other. But when uninstalling one of the packages - how do I remove only the key that is associated with that package?

Thanks for any help
Markus
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: prevent key from being uninstalled / multiple versions

Hi Markus,

32-bit and 64-bit keys go in different places in the registry whether their component's ""64-bit component" option is set or not.
The recommendation is to use this in your projects so that 32-bit registry entries go in Wow6432Node Registry Key on a 64-bit machine.

Also, I don't quite understand why your users would install both versions of the same application (32-bit and 64-bit) on the same machine?

From another perspective, if indeed you have several applications using the same resources the recommended approach is to follow How can I share a file between multiple packages so when one of the packages is uninstalled the file is not deleted? FAQ.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mheckmann
Posts: 74
Joined: Wed Apr 20, 2011 6:24 pm

Re: prevent key from being uninstalled / multiple versions

Hi Mihai,

oh ok, so to have it in the Wow6432Node I will have to enable the "64-bit Component" attribute in the Organization section.
I tried setting the "Shared among packages" attribute thinking that sounds like the right attribute but still the newly installed version would remove keys/values from the previous installed version...

we often install both 32 and 64 bit versions to test and run different builds on the same machine while only allowing one build/version on a machine.

The Question I guess comes down to this:
I install a key in the registry for a an image extension:
So in HKEY_CLASSES_ROOT I would add for example a key ".tiff" .
In there I now add a key for "OpenWithProgids" and add the necessary values so my software shows up in the Open With Menu.

Now if this key didn't exist before and another software comes along and adds it's own value into this key, how can I prevent the whole key from being removed when my software is uninstalled? I still want my values to be removed, but leave the values from other software packages intact.

Thank you very much for your help. The installer is still a strange beast to me ;)
Best
Markus
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: prevent key from being uninstalled / multiple versions

You're welcome Markus,

First off, another observation. Why don't you use the predefined functionality in Files Associations page to create the behavior instead of manually handling the registry?
Now if this key didn't exist before and another software comes along and adds it's own value into this key, how can I prevent the whole key from being removed when my software is uninstalled? I still want my values to be removed, but leave the values from other software packages intact.
The default uninstall behavior is to only remove the values installed by the package. If the key contains other values from other packages they won't be removed.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mheckmann
Posts: 74
Joined: Wed Apr 20, 2011 6:24 pm

Re: prevent key from being uninstalled / multiple versions

Hi Mihai,

I didn't use the File Association just because I couldn't find information on how to only add an entry to the "Open With..." right-click menu.

On the second point, this is where I must have a funny setting. My observation is that after installing the 32 bit package followed by the 64 bit package, the values from the 32 bit package are gone...

cheers
Markus
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: prevent key from being uninstalled / multiple versions

Markus,

Can you send me the 32-bit and 64-bit project files (.AIP) to our support e-mail address so I can have a better look why?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”