Run uninstaller and wait until terminated - installshield

all/
There is app, installer for app is created by InstallShield (not msi project)
I need uninstall app and wait until uninstaller terminated.
I read registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{MyAppGuid}, UninstallString and try start uninstaller
in my case UninstallString = "C:\Program Files\InstallShield Installation Information{9F2A3D76-7785-492F-89E5-3F0FE2D205DC}\setup.exe" -runfromtemp -l0x0419 -removeonly
but in cmd.exe
"start /wait {UninstallerString}" don't wait until uninstaller terminated. I think uninstaller run same temp exe and terminated immediately. but then how can I resolve ny problem? Any idea??

Installshield added a /clone_wait switch at some point which solves your problem, as seen here:
This parameter indicates that the original setup should wait for the cloned setup process to complete before exiting.
Your uninstall string will look like this:
UninstallString = "C:\Program Files\...\setup.exe" -runfromtemp -l0x0419 -removeonly /clone_wait
-clone_wait will probably work too but I've tested and used it with /clone_wait.

Related

uninstall silently in background using setup.exe

I want to uninstall a software which is installed using EXE not MIS. By running the uninstall Strin in CMD i can able to uninstall but its asking conformation messages.
My intention is to uninstall it silently
"C:\Program Files (x86)\InstallShield Installation Information\{2EA86967-B3D3-4B2E-9DE9-28A595AF2E2E}\setup.exe" -runfromtemp -l0x0409 -removeonly
I tried this command but its asking so many conformation messages for uninstall. Is there any attribute I can add here so that it will uninstall in background
Try executing the setup with silent execution parameter as mentioned in the below article:
silent command line parameter: Setup.exe /s /v/qn
https://docs.flexera.com/installshield19helplib/helplibrary/IHelpSetup_EXECmdLine.htm

Inno Setup Exec doesn't wait for InstallShield uninstallation to complete

Trying to uninstall a software using the uninstall string (and running that with Exec in InitializeSetup) before installation, it doesn't wait for the un-installation to complete but proceeds to the next step of installation in Inno Setup.
I am using the following code and the software I am trying to un-install in an Installshield product:
Exec(
ExpandConstant('{pf}\InstallShield Installation Information\{{XXX8X88X-XX8X-88X8-X8XX-88X888X88888}\setup.exe'),
'-s -runfromtemp -l0x0004 -removeonly -remove', '',
SW_SHOW, ewWaitUntilTerminated, ReturnCode)
The setup.exe most probably executes a subprocess for an actual uninstallation and exits itself. So Inno Setup seemingly does not wait for the process to finish. This is a common behavior, as the uninstaller needs to delete itself, what it cannot do, if it still running. So it creates a copy of itself (or another executable) in a temporary folder and (re)executes from there.
As per InstallShield documentation, you can try adding /w or /Clone_wait switches to the command-line:
/w ... For a Basic MSI project, the /w option forces Setup.exe to wait until the installation is complete before exiting.
/Clone_wait ... This parameter indicates that the original setup should wait for the cloned setup process to complete before exiting.

Inno setup- How to 'remove' SQL native client unattended

I am trying to check for previous installation of SQL native Client 11, before installation and if found, it needs to be uninstalled. Executing UninstallString in Inno Setup
Things work fine, but I want the Uninstall to be performed unattended. I am getting options Modify,Repair,Remove in the wizard. How can I select Remove by default and proceed with uninstall silently?
Note: It uses MsiExec and /U /SILENT parameters in the Exec function seems to just exit without any errors.
Thanks in advance.
Try
MsiExec.exe /x{FA5C8C7E-3939-4219-A18E-0519832FE06A} /qn
(I found the options on http://www.advancedinstaller.com/user-guide/msiexec.html)

Open File during Installation

I am using NSIS to create installer. Also I need to install other program (I have his installation file). How add second installer to automatically run it during first installation?
The simplest is to run the file (which must be first extracted to some directory,. e.g. $TEMP) with
ExecShell "open" "$INSTDIR\app.exe"
or with
ExecWait '"$INSTDIR\someprogram.exe"' $0
if you want to wait for program to finish.
Also consider many possibilities: whether the app should be run with some parameter, in Silent mode or elevated with admin rights or run as original user...

How can I make my NSIS silent installer block until complete?

When I run a silent NSIS installer (from the console, as in installer.exe /S /D=C:\Foo) it immediately moves to the background. I'd like to wait until it has finished installing before I do anything else. Is there a flag I can pass to tell the installer to be blocking?
You don't say anything about how you start the process in your question! NSIS installers are always "blocking", for a silent installer this means you just have to wait for the child process to end.
If the parent process is also a NSIS installer you can do ExecWait '"c:\path\to\installer.exe" /S /D=C:\Foo' or if it is a batch file you must use start "" /WAIT "c:\path\to\installer.exe" /S /D=C:\Foo

Resources