Hello all,

This is my first post on this site so I hope this is in the right section. I find myself having to uninstall an aplication on 2000 servers. The application itself is installed via a setup.exe which does not seem to support any switches. I spoke with the company and they provided me with a manual uninstall batch file which basically stops the application services, runs a series of Regsvr32 commands to unregister DLL files, run 2 executables with the -unregserver switch and then runs the services executables with the -uninstall switch. This method works for sure but there is one major problem. The point in the batch file where the service executables (2 of them) are run with -uninstall causes a popup message box telling me that it was successful. This makes running this via SMS 2003 a problem. Does anyone have any thoughts on how to surpress these 2 messages or some other method to write an uninstall package for this application. Here are soem of the things I have tried up to this point:

  1. Run the executable with a /? switch, /help switch, -help switch. Each one just starts the executable so my guess is that none of these are supported.
  2. Run the executable with -r to record an ISS file which was successful. I ran the uninstall in record mode and it was created. I than tried to run this using setup.exe -s -f1"filename.iss" but it only reinstalled the application.

Up to this point, I have not ever had to repackage anything for deployment via SMS so that is something new to me but I do have access to InstallShield or the SMS Packager tool which is a very lightweight version of Wise from what I can tell. Any help on this issue would be greatly appreciated. Thank you.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
ORIGINAL: jpgregg
Does anyone have any thoughts on how to surpress these 2 messages or some other method to write an uninstall package for this application.
You could do something simple like 'NET STOP [service_name]' via a Custom Action. Th eproblem with that is that you have no reliable way to tell if the service stopped. Much better to use a WMI-based script to stop the service, because you can then test its status in a controlled loop. I have posted an example here http://senduit.com/a55faf. The link expires in 24 hours.
Answered 05/27/2008 by: VBScab
Red Belt

Please log in to comment
0
I am not having issues stopping the service. The problem is when I run the command servicename.exe -uninstall, it presents a pop up box that says the uninstall completed successfully. This message makes it impossible to run this in an unattended fashion. Here is an example of the batch uninstall I am attempting to run. The problem parts are highlighted in red.

NET STOP SERVICENAME1
NET STOP SERVICENAME1

SERVICENAME1.EXE -uninstall
SERVICENAME2.EXE -uninstall

Regsvr32 -u -s DLL1.dll
Regsvr32 -u -s DLL2.dll


SomeExe.exe -unregserver

RMDIR "%SYSTEMROOT%\SYSTEM32\SOMEAPP" /S /Q
RMDIR "%SYSTEMDRIVE%\PROGRAM FILES\SOMEAPP" /S /Q
RMDIR "%SYSTEMDRIVE%\Program Files\InstallShield Installation Information\{SOMEUID}" /S /Q

REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{SOMEUID} /f

Obviously this is just an example of my true batch file. I have pulled out file names and directory names for security reasons but the 2 commands highlighted in red cause a popup message which makes automation impossible. I am really looking for some way to surpress the successful messages or package these commands in a fashion that doesn't cause pop ups.
Answered 05/27/2008 by: jpgregg
Yellow Belt

Please log in to comment
0
OK, perhaps my response wasn't clear. What I meant you to do was bypass using the EXE to uninstall the service. Thus, you'd stop the service then delete its files and registry junk in your batch file or, for much more control, in a script. Service registry stuff is stored in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\[ServiceName]
Answered 05/27/2008 by: VBScab
Red Belt

Please log in to comment
0
You are correct. I did misunderstand your message. That option does make a lot of sense to me. I will look into that as an option for doing what I need. Thank you.
Answered 05/27/2008 by: jpgregg
Yellow Belt

Please log in to comment
0
This worked exactly as I wanted it to with one little exception. After the batch file runs, the files are correctly removed but the application services stay in the services viewer until after a reboot. I have removed them from the registry but ti takes a reboot to actually clear them. This is not a show stopper by any means but I was wondering if you had any tricks for that besides rebooting the servers.
Answered 05/27/2008 by: jpgregg
Yellow Belt

Please log in to comment
0
ORIGINAL: jpgregg
the application services stay in the services viewer until after a reboot.
Ding! [light bulb appears over head...]
If you have the Platform SDK or the Server Resource Kit, there's a nifty utility SRVINST (or is it SVRCINST? SVCINST?) which, IIRC, can uninstall as well as install services. IIRC further, it sends the appropriate Windows message to update the list of services, too. Other than that, I can't help you at a basic level. You *could* get into script-friendly DLL authoring and create an ActiveX DLL to send the update message but I think that would be over-egging the pudding somewhat.
Answered 05/27/2008 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity