how can i restore the registry value after an msi is uninstalled

B

BxDown

I have several small msi's that change the registry stopping users
from using certain features of windows such as cmd.exe etc. the
problem is some of these msi's change the existing value from say 1 to
0 but on uninstall they clear the entry and leave it blank. Is there a
way to include in the install a way to backup the original value and
then upon uninstall restore the original value?

Thanks
ZTahir
 
J

Jeff Henkels

The quick and dirty way would be to use a couple of custom actions. The
first, executed on install, would save the old value, say, by copying it to
a different name. The second CA would execute on uninstall and read the
saved value from the name created by the first CA, then write it to the
appropriate place.
 
G

Guest

Thanks Jeff..
I'm gonna try setting up custom actions..
so what is the long and clean way :)

-----Original Message----->The quick and dirty way would
be to use a couple of custom actions. The
 
J

Jeff Henkels

Probably something involving the Registry, RemoveRegistry, AppSearch, and/or
CCPSearch tables. You'd use the AppSearch or CCPSearch to get the original
registry value into a property; then use the registry table to save that
property in the appropriate place.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top