Jump to content

registry question


hotte

Recommended Posts

Hi,

I'm facing the problem to deinstall a particular application from various systems. Involved operating systems include NT4, Windows 2000, Windows XP and 2003 Server. NT4 systems will be upgraded in the future but for now I have to deal with them.

Goal is to deinstall different versions of that software in some kind of unattended mode. Of course I could create a setup.iss file to run the deinstallation in silent mode but there is a mix of MSI and older Installshield packages (guess version 7). As far as possible, everything should be done with a script and without bigger data transfer to the clients (limited amount of bandwith).

What I intend to do is to run a command like

for %%a in (*.dll) do regsvr32 /u /s %%a

cd..

rmdir %programfiles%\progdir /S /Q

This works well so far, now the tricky point. There are entries in HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall which reflect the installed programs. So, I may run my few commands, unregister all necessary files and delete them but a user is still facing the "installed program" if he/she looks into settings\control panel\software. For Windows XP and Windows 2003 Server I found 'reg delete' to delete the necessary entry from the registry. But this command does not exist for NT4 and Windows 2000.

So here are my questions: Has anyone an idea which might help to delete the particular entry from the registry from within a batch file? Are there any possibilities to deinstall older Installshield packages in some kind of silent mode without having the user click 'ok' to deinstall?

regards,

Sascha

Link to comment
Share on other sites


I have a few scripts on my site you might want to look at

Remotely uninstall software.

http://lazynetworkadmin.com/content/view/16/6/

this one is a little tricky but has worked for me on a couple of different scenarios.

and this one

Mass Delete Registry Keys

http://lazynetworkadmin.com/content/view/25/6/

This one will read registry keys off of a text file and delete them. This only works for registry keys though but it sounds like that is what you are looking for.

Link to comment
Share on other sites

Or couldn't you make a .reg file that looks like this:

Windows Registry Editor Version 5.00

[HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall]
"applicationname"=-

Check out the syntax here:

http://support.microsoft.com/kb/310516/

Then all you would have to do is call the .reg from your script. Also, if you are targeting NT4 you'll need to change the header to the older style (Can't recall off hand what it is).

Personally, I use a scripting language called AutoIt, and it has reg editing functions built into it. But that's too much work to learn that when you can use any of the solutions posted here. Good luck!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...