Some users may experience issues accessing the Product and Licensing Center. We are actively investigating the issue and working towards a resolution.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SMS Edition, how to delete registry keys

Hi,
I need to include deletion of registry keys in my MSI package.
So I tried to have the repackager capture
regedit deletekeys.reg
but no registry key deletions are captured. I configured Adminstudio to include registry key deletions and removed the registry key monitoring exclusions but no key deletions are detected.

How can I manually do this?
Please note that I'm using the limited SMS edition, so I don't have all the features.

Appreciate any help.
(6) Replies
Often times, your .msi is already capable of undoing the changes made during installation. Other words, if the registry was installed during package installation, it will delete/unregister itself at uninstall (most of the times).

You can write a CA to delete the entries or hive, if you know what exactly you want to delete.
There is an older version of the application installed and it wasn't installed with an MSI setup. When I install my new MSI package it get problems.
I would like to create an MSI package that would first manually remove the old version by deleting a few files and registry settings and then do the actual deployment. I would like to have one single MSI file that does that so I can deploy it with AD. I tested the manual uninstall which works fine (a simple batch script) but I need to do these with the MSI file itselfe during deployment.

You mentioned "CA" what is that?
Ok, now I understand.

Take some thoughts from these folks:
http://community.installshield.com/showthread.php?t=92019
http://community.installshield.com/showthread.php?t=104752

CA - Custom Action.

Capturing may not be a best idea of previous uninstallation however creating a custom action that will check for particular hive/entry of the earlier program and running the uninstall feature of the earlier program may work. You can look into the ideas as folks have mentioned in the linked threads.

Logical Example of how to look into the registry for uninstall:

IF EXISTKEY("HKEY_LOCAL_MACHINE\Software\Your Program") <> 0
? "Key does not exist"
GOTO ENDUNINSTALL
ELSE

IF EXISTKEY("HKEY_LOCAL_MACHINE\Software\Your Program") = 0
? "Key does exist!"
GOTO UNINSTALL


Also, can't you just invoke your uninstall script in AD which will uninstall the earlier app and then invoke your new .msi installation? I think it is possible (not sure though how to do it, not an AD guy... 🙂 )
I think I can't do CAs in the SMS Edition.
I'm still wondering why I couldn't capture registry deletes in the first place.
the .inc files references:

RegLoad('Updated.isr')

and the Updated.isr file seems to have all the registry add commands.
Can't I squeeze in there some registry delete commands? Not sure what format to use.
A few thoughts....

What capture method were you using? I find multiplestep snapshot works really well.

Also if you have the regfile containing the deletes, why do you need to 'capture' it? Just author it into the RemoveRegistry table.

The SMS edition doesn't have Editor. It just has the repackager that creates the ISM project and build the MSI. With that said, I think thats actually a good thing. You get the important pieces of AdminStudio for FREE and then go spend less money on InstallShield12 then AdminStudio 7.5. You also don't have to wait 6-9 months for the latest version of InstallShield ( now 12 ) that AdminStudio doesn't yet offer.
I was using the monitoring method.

Can I author this RemoveRegistry table with the SMS Edition?
Can u give me a hint?
I'm new to the macrovision tools.

rgds
OSalah