Stop .exe in command window from restarting computer after uninstall

1

1

I am uninstalling a Cisco Agent Desktop maintenance update from several thousand client machines and I'm unable to stop it from restarting. An MSI file is calling an srRollbackRepair.exe file that runs in a blank CMD window, and after about 10 seconds it restarts the computer.

The srRollbackRepair is not needed because it is attempting to repair the original installation, which will also be removed (or may already be removed), so there is no point to a rollback repair. If I remove the original application (without the maintenance update) it leaves the update.

Is there a way for me to set some sort of flag/switch that either

  1. stops the .exe from being called by the MSI or
  2. prevents the srRollbackRepair.exe from generating a restart or
  3. autocloses the cmd window before it can complete and restart since rollback is not necessary?

Maybe there is a way to autoclose the cmd window after a few miliseconds? I know the .exe is starting the restart because I can run it independent of the MSI and it restarts.

Also I know the MSI doesn't need the .exe file to complete uninstallation because if I exit its cmd window after it launches it will never restart – and under Programs and Features, the maintenance package is gone.

I have already tried the following on the .exe and MSI:

/? (generates nothing for exe)
REBOOT=REALLYSUPRESS
/noreboot
/norestart
/delayrestart

montag

Posted 2013-07-23T15:58:16.870

Reputation: 135

Can you just remove the exe from the uninstaller or replace it with a dummy exe that does nothing? – Ganesh R. – 2013-07-23T16:39:00.823

Did you try /promptrestart? – trpt4him – 2013-07-23T16:39:39.087

I actually fixed this about ten minutes after I asked it but stackoverflow wont let me answer my own question. I deleted the whole CAD folder in Common Files which contained the exe and it didn't call the exe or give an error, which worked. So yeah, Ganesh, you would have been right. – montag – 2013-07-23T17:40:14.123

WHY are you crossposting the same question on >1 SE? This is very bad, please discontinue this practice. – mdpc – 2013-07-23T17:53:55.490

mdpc, I don't understand what you're saying. I have only posted this here – montag – 2013-07-23T17:58:48.867

You said "Stack Overflow" wouldn't let you post an answer, but [so] is a different site. This here is Super User. Maybe that's where the confusion comes from. – slhck – 2013-07-23T19:22:15.500

*Super User. My bad. It's owned by StackOverflow and I'm an ex programmer so I forgot – montag – 2013-07-24T15:03:21.907

Answers

0

InstallShield with MSI command line

record uninstall ISS answer file:

setup.exe /uninst /r /f1"<ISS_Files_Directory>\uninstall.iss"

silent uninstall use ISS answer file:

setup.exe /uninst /s /f1"<ISS_Files_Directory>\uninstall.iss"

may be help ...

way 2, Privilege Constants:

  1. Disable privilege SE_SHUTDOWN_NAME.

  2. Uninstall MSI.

  3. Enable privilege SE_SHUTDOWN_NAME.

STTR

Posted 2013-07-23T15:58:16.870

Reputation: 6 180

0

Just have your script rename or delete srRollbackRepair.exe first. This is what my file looks like:

del /f /q "{path-to-the-file}\srRollbackRepair.exe" 
#uninstall service release
msiexec.exe /qn /x{4682F8A7-0BA1-4165-A003-EC50BB43A8AF} /norestart
#uninstall CAD
MsiExec.exe /qn /x{007C5E6D-3037-4C00-A5FD-561F239169C4} /norestart

Verify the install codes are correct for your version but otherwise you should be good. I used this to remove CAD then install a newer version.

senseiTX

Posted 2013-07-23T15:58:16.870

Reputation: 1