Running an installation program from Team City - teamcity

Is it possible to execute a setup program, which requires user input, from TeamCity?
It is an MSI installer file and using all the defaults is just fine, I just need to run the installation program automatically.

Use msiexec /i foo.msi /quiet to avoid the installer prompting.
There are other possibly relevant options; see msiexec /?.

Related

Silent Installation for msi using Install shiled

I have an msi project created using installshield. This works good when installed using GUI window. But when I am going through silent installation, I am getting an error with a CustomAction that I have created, which will simply generate a log file. Since it is working correctly during GUI installation I feel pretty sure, the CustomAction is not an issue.
Command I have used for silent installation
msiexec /i "Setup.msi" /qn /l*v C:\msilog.txt
Is there something that I must do to suppress the next buttons in the GUI mode during silent installation?

How to go from .msi installer to electron-builder (nsis)

I currently have an application out in the field that was distributed as a .msi installer (Built with Wix). I've just finished porting this application over to Electron to take advantage of all of the latest and greatest features including using Electron Builder and Auto Updates.
Any wix/msi gurus know the best way I could uninstall the old msi and run the new installer? The solutions I have found involve searching through the Windows Registry to find the msi UUID then using msiexec.
Is it possible to just create a new version of the .msi that cleans up everything?
If I understand correctly you want to migrate from MSI to NSIS format?
There is an article on this here:
https://nsis.sourceforge.io/Uninstalling_a_previous_MSI.
I would suggest, however, that you find the product code for the MSI and invoke msiexec.exe with the product code and your own uninstall string (not the one gotten from the registry as shown in the above documentation). This way you can add a few constructs to prevent spontaneous reboot and to enforce proper silent running. This approach is described below.
Uninstall MSI: You can uninstall the previous MSI version by running an uninstall command in any number of ways: Uninstalling an MSI file from the command line without using msiexec.
Find Product Code: You can find the product GUID of the MSI as follows: How can I find the product GUID of an installed MSI setup?
Command Line: Combining approach 3.5 from first link above and the product code found using the information in the second link, you can use a command line like this to invoke from your NSIS installer:
msiexec.exe /x {11111111-1111-1111-1111-11111111111X} /QN /L*V "C:\msilog.log" REBOOT=ReallySuppress
Quick Parameter Explanation:
/X = run uninstall sequence
{11111111-1111-1111-1111-11111111111X} = product guid of app to uninstall
/QN = run completely silently
/L*V "C:\msilog.log"= verbose logging at path specified
REBOOT=ReallySuppress = prevent unexpected reboot of computer
ExecWait: NSIS requires its own peculiar command format: Running MSIEXEC in a NSIS script with installer switches. Haven't tested this yet, but a suggestion:
StrCpy $R0 "{11111111-1111-1111-1111-11111111111X}"; the MSI's ProductID of my package
ExecWait '"msiexec.exe" /x $R0 /QN REBOOT=ReallySuppress'
Check here for fine-tuning the command line: https://nsis.sourceforge.io/Uninstalling_a_previous_MSI.
Links:
https://nsis.sourceforge.io/Uninstalling_a_previous_MSI
https://nsis.sourceforge.io/Auto-uninstall_old_before_installing_new
How do I require user to uninstall previous version with NSIS
https://nsis.sourceforge.io/Removing_MSI_packages_with_MSI_related_functions

How to install OpenLDAP for windows silently

I am trying to find information about running the exe installer at OpenLDAP for Windows. The forum has little info and the installation documentation only describes the UI based install.
It seems like the exe is wrapping 2 msi files: The main installation msi and the kerberos msi.
To get them I used 7zip to extract the OpenLDAPforWindows_x64.exe installer. I then copied and renamed the folloinwg following files:
OpenLDAPforWindows_x64\.rsrc\BIN\229 -> OpenLDAPforWindows_2.4.42_x64.msi
OpenLDAPforWindows_x64\.rsrc\BIN\231 -> kfw-4.0.1-amd64.msi
I can then call each of them separately from the command line.
For example to call the kerberos installer with logging (allows to get the properties that can get passed to the installer when running it silently, eg: KERBEROSDIR):
msiexec /i kfw-4.0.1-amd64.msi /log kerberos_inst.log
To call the OpenLDAP installer silently while setting a custom install directory:
msiexec /i OpenLDAPforWindows_2.4.42_x64.msi /qn /log openldapd_inst.log INSTALLLOCATION="F:\CustomOpenLdap\"

Silent Installation of setup.exe

I'm trying to run a silent installation for a couple of setup.exe. I searched for this topic and the suggested command was:
setup.exe /q
I ran the command and still received the setup wizard. The applications I'm trying to install are VB6 apps. I believe the installers where created using the Package & Deployment Wizard tool. I'm unsure if this has anything to do with it.
To do a silent install, you have to use the following syntax (with log file) :
setup.exe /s c:\yourlogfilename.log
You must include the full path after /s which will launch a silent installation.
The only thing which could interupt the silent installation is the "Setup is attempting to copy a file that is older than the one currently..." dialog box.
I believe the "s" switch should be used. setup.exe /s should work, but if not, you can try setup.exe /silent. If you want a log add a path to the log file after the switch.
Try
setup.exe /sc:\path\to\yourlogfilename.log<br />
In Visual Basic installers there must be no blank between /s and the path for log file.

How do I do a silent install and uninstall with WiX and MSI?

How can a silent installer be created in WiX that does not display any UI dialogs to the user and installs, upgrades and uninstalls with default settings?
Windows Installer (MSI) uses the following command line arguments to be silent:
Silent install or silent major upgrade:
msiexec.exe /i foo.msi /qn
Silent minor upgrade:
msiexec.exe /i foo.msi REINSTALL=ALL REINSTALLMODE=vomus /qn
Silent uninstall:
msiexec.exe /x foo.msi /qn
Executable path:
C:\Windows\system32\msiexec.exe
Installer .exe's created with WiX can be run from the command line without requiring user input by using one of these command line parameters:
/quiet - Displays no UI whatsoever
/passive - Displays a UI but requires no user input. Essentially just displays an install progress bar
This answer is based on WiX 3.9.
All MSI installers whether created by WiX or not can be controlled via command line arguments. So you can make an installer with UI and still install it silently, there is no need to remove the UI from the installer just suppress it on the command line. Remember, make sure you add the upgrade element in your first installer so subsequent ones will match
Just don't include any UI/UIRef elements and then no UI will be included :)

Resources