tags:

views:

156

answers:

1

I am trying to add a feature to my msi based installer, written in wix, which will allow the user to change the name of the folder that keeps the shortcuts within the Windows start menu.

What I did so far is to add a folder there (with a static name), add shortcuts to that folder and remove all of them during uninstall (by using the RemoveFolder tag). Then I added a custom action that will pick up the property that is set from an edit box in UI and set that as the name of the folder, something like:

By running this within the InstallExecuteSequence, the folder is created correctly (with the name the user set for it) and all things are set into place. However, when I uninstall the product, the folder remains with all of it's shortcuts in it (that point to nothing now and they ask for deletion when you click them).

Is there any way to remove a folder that I dynamically changed it's Name attribute during installation, as described above?

Thanks.

+2  A: 

You'll need to save the dynamic property to the registry, and read it back during maintenance/repair/uninstall. Windows Installer doesn't "remember" property changes, you need to do it yourself.

sascha
Thanks a lot :)
Mihai Cozma