Any idea if it's possible to print from terminal arguments that installed will accept. eg ansible.windows.win_shell: | cd C:\ansible\packages\windows msiexec /l*v log.txt /i zabbix_agent2-5.4.10-windows-amd64-openssl.msi /qn^ SERVER=1.1.1.1
There I have .msi package but it would be helpful to get arguments that are acceptable for the installer like SERVER in example. From Microsoft I can get the basic list of arguments but not custom ones.
Any idea?
Cheers
Related
Hi, I create a Setup with Installshield 2015. my setup has a prerequisites for reporting viewer so i want to install CR_Runtime13.0.17.msi silently. for this situation we want a command to start the cr_runtime setup silent, after many searches on the net i found this command.
msiexec /i IsSetupPrerequisites\CR_Runtime13\CR_Runtime13.0.17.msi /qb /norestart
when i use this command on Cmd it works well and setup is begins silently with progress bar but when i use this command on installshield, it show me an error and a help every time.
please help me to create a command for installshield to install cr_runtime13.0.17 silently.
at the end i Attached installshield command page and my help to this Question.
Many Thanks to all
The Specify the command line for the application value is really just the arguments. From Specifying Command-Line Parameters for an InstallShield Prerequisite:
Type any valid parameters for the file that is selected in the Specify the application you wish to launch list. Do not include the name of the file in this box.
Remove your inclusion of msiexec and an attempted relative path to the msi, leaving you with just /qb /norestart, and you should avoid the msiexec error. If that one still gives you problems, consider replacing /norestart with REBOOT=ReallySuppress.
I had to create a prerequisite for .net 4.6.1 and it worked silently when I had only /q /norestart in the command line and command line for silent mode.(instead of /qb /norestart)
I have created Basic MSI Project for creating installer for my project in Installshield 2014 and it is working fine. I have also created a custom action to execute my exe file while installing the application.
Then i create a Silent Installer using (/s) command line argument. I want to pass the Config file to my MSI setup and one of my Custom Action exe file need this Config file to setup basic project setup.
e.g
Installer.msi /s "c:\project\config.txt"
How to pass this config file parameter to my exe as command line argument?
I have searched in google and existing questions also. I didn't get way to do this.
Till now i didn't get any way to do this. Please anyone help me to do this.
Thanks in advance.
You can pass values to your MSI by command line. This is one way to pass values straight into your MSI, another way is using a transform to modify the MSI. See this answer: Using msiexec.exe custom command lines, or using transform files.
As far as I know there is no limit to how many values you can pass by command line:
msiexec.exe /I "C:\Install.msi" /QN /L*V "C:\msilog.log" STARTAPP=1 FIREWALLRULE="Long string here"
Quick explanation of command line above:
/L*V "C:\msilog.log"= verbose logging
/QN = run completely silently
STARTAPP="1" = Your property indicating the app should be started after install
FIREWALLRULE="Long string here" = Your firewall rule to apply via a custom action
Yes, Glytzhkof is right.
According to your question, you are free to "invent" an own property e.g. CONFIGFILE and pass on the commandline something like CONFIGFILE="C:\myconfig.ini" or something similar.
If the path is always the same (e.g. in SOURCEDIR), you can avoid the whole path and add it in your code, but don't rely on the source for a patch (.msp) for example.
I am not sure if I understand, what you mean exactly with "silent installer".
You can call every msi setup with the parameter "/qn" (or "/quiet") silently. The "/s" parameter does not belong to MSI, but is more common for setup.exe files (bootstrappers) or InstallShield script projects. Of course you can combine a bootstrapper with a MSI called.
For example, using the InstallShield built setup.exe could be something like:
setup.exe /s /v "/qn CONFIGFILE=myconfig.ini"
I am writing a powershell script to uninstall and install a product. Uninstallation and installation process is just clicking on several next buttons with default values populated.
Could you please suggest how to install the MSI file without prompting user for clicking on several next buttons and complete the installation process very quietly.
If I wanted provide customized values during the installation, what could be the process to find out the property names and how to run it silently. Please refer to any references to explore further.
I am using powershell 2.0 and please let me know if further information is needed. Thanks in advance.
Regards,
Kumar
To install a .msi file silently, you should be able to use the /quiet switch with msiexec.
If you need to customize anything, you can set property values like this: PROPERTY=Value
Altogether:
msiexec /i C:\Path\To\File.msi /quiet PROPERTY=Value
To see all the options, just run msiexec without any parameters.
This question is also very similar to yours.
You can do this only if the MSI helps you :). For example, if a property called SERVERNAME is set to FRED in a dialog, then you could say SERVERNAME=FRED on the command line. This assumes that the InstallExecuteSequence that does the work of the install uses just the value FRED. Problems occur when the UI sequence does extra things that won't happen in silent mode because the UI sequence doesn't run in a silent install. If the UI sequence dialogs change SERVERNAME by (for example) adding \ to the front and \MyShare at the end and \FRED\MyShare is used in the execute sequence then you need to know set the command line to SERVERNAME="\FRED\MyShare" because that's what the execute sequence expects. If you don't know all the potential relevant property values you could run the install in UI mode with a verbose log and see them. So in the absence of documentation for silent install you need to reverse engineer it a bit.
If you want to specify what features are to be installed then use ADDLOCAL=comma separated list of feature names.
The basic command line for running silently is (paths truncated):
msiexec.exe /I "C:\WiX.msi" /QN /L*V "C:\msilog.log" MYPROPERTY=1
You can also apply a transform (see explanation below):
msiexec.exe /I "C:\WiX.msi" /QN /L*V "C:\msilog.log" TRANSFORMS="C:\Wix.mst"
/QN: run silently, no GUI during or after the install
/L*V: write verbose log file with all information
MYPROPERTY: set a property at the command line. You can set multiple.
The way an MSI file is supposed to be modified for corporate use is to use a transform file (*.mst).
This is a little "database snippet" that can change the MSI file (which is a database) once applied to it during runtime.
A transform can literally change anything in the MSI, but most often it is used to adjust small things such as removing shortcuts, eliminating undesired runtimes, etc...
A transform is applied to an MSI on the msiexec.exe command line by adding the keyword TRANSFORMS followed by the path to the *.mst file.
You can also uninstall MSI files in a variety of other ways (besides the msiexec.exe command line). Here is a rough guide for how to uninstall MSI files. It includes information on how to uninstall with PowerShell, WMI, VBScript Automation, etc... And there is another post on serverfault.com on the issue of avoiding the use of msiexec.exe to prevent unwanted dialog boxes from popping up during automated runs.
I was trying to use MSI installer to install this file myInstaller.msi and also pass the value "192.168.2.1" to IPADDRESS, which is mandatory on the process of installation. However, it comes up an error message "install failed". I checked on Windows, the application is installed, but it's not on Windows Services, where it is supposed to be.
msiexec /i myInstaller.msi IPADDRESS=192.168.2.1
I also have read this link msiexec does not pass parameters to custom action. There is comment saying that installing ORCA and then editing the MSI file, it should work, however, after I have deleted cut row containing CustomTextC_SetProperty_EDIT1, and then saved the MSI file, it seems it's broken, it can not even run, the file is damaged.
Any help for this? I have been working almost 2 days trying to work it out, but can't. :-(
I'll try to answer with a potential quick fix rather than a long explanation:
Open an unharmed copy of the MSI file with Orca
Add to the Property table:
Property column: IPADDRESS Value column: 192.168.2.1
Then add IPADDRESS to the delimited list in SecureCustomProperties. See image below
Save and close, and run the MSI
Open an elevated cmd.exe prompt (search in start menu for cmd.exe, right click and run as administrator)
Install with command line (modify with your own paths): msiexec.exe /I "myInstaller.msi" /QN /L*V "C:\msilog.log"
Check results, and report here what you find. Most likely there is something else wrong, but this will bypass most other error sources.
I do not recommend this approach as anything but a quick test.
We have an older app from 2006 we'd like to uninstall at the command line using group policy, but I can't get a silent uninstall to work.
This works. Of course I need to click Next to uninstall:
"C:\App\Setup.exe" /uninst
But this does not. I see an hourglass for a couple seconds but the app is not uninstalled.
"C:\App\Setup.exe" /uninst /s
I also unsuccessfully tried some VBScripts. They find the app listed but the uninstall fails. I'm not too familiar with how this process is supposed to work.
You need to create first an ISS response file to silently remove your application,
Create response file :
C:\App\Setup.exe /r /f1c:\app\uninstall1.iss
you will be asked to uninstall, .... and perhaps reply the others windows.
Then your application would be uninstalled and you get a new response file c:\app\uninstall1.iss
Next, if you want to remove silently this application on another computer :
launch : C:\App\Setup.exe" /s /f1c:\app\uninstall1.iss
For more information see:
http://www.itninja.com/blog/view/installshield-setup-silent-installation-switches
Best Regards,
Stéphane
Try this, with the original setup.exe version that was used to install
"C:\App\Setup.exe" /x /s /v/qn
I've been struggling with the silent uninstaller for a while, and finally came to a solution that works for me in most cases, both for InstallShield v6 and v7.
1. First (as it was mentioned above), you have to generate an InstallShield Response file (e.g. uninstall.iss). In order to do that you have to launch your setup.exe with parameters:
> setup.exe -x -r -f1"C:\Your\Installer\Location\uninstall.iss"
This will go through the normal uninstall wizard and generate a Response file for you: uninstall.iss
2. Then, before trying your silent uninstaller, I guess, you should re-install the software.
3. And finally, run your silent uninstaller playing back the recently generated Response file:
> setup.exe -x -s -l0x9 -ARP -f1"C:\Your\Installer\Location\uninstall.iss"
That's it.
Now, a few important notes:
Note 1: I'm working with a 3-rd party installation package that I didn't build myself.
Note 2: I use dashes (-) instead of slashes (/) to define parameters. For some reason it doesn't work with slashes for me. Weird but true.
Note 3: The -ARP and -l switches are required for some installation packages to manage the software removal from the Add/Remove Programs list and to preset the default input language accordingly.
Successful silent uninstallation is all about the correct parameters!
So keep exploring, the correct parameters vary depending on a specific package and installer version.
I hope my input was helpful.
Try
Format: Setup.exe M{Your Product GUID} /s /f1[Full path]\*.iss for creating the ISS file for uninstallation.
From Stephanie's sample, I think it's missing the GUID.
There's a good link at the developer's site # Creating the Response File.
Try it out n tell us,
Tommy Kwee
I struggled with this for a long time so posting it here in case anybody else stumbles upon it.
If you happen to have an installer which uses the legacy Package-For-The-Web format then you need to use the parameter -a to pass additional parameters to the extracted setup file.
Record (un)installation files (click through the installer manually):
.\DWG2PDF2019.exe -a /r /f1"c:\app\dwg2019_install.iss"
.\DWG2PDF2019.exe -a /r /f1"c:\app\dwg2019_uninstall.iss"
Silently (un)install:
.\DWG2PDF2019.exe -s -a /s /f1"c:\app\dwg2019_install.iss"
.\DWG2PDF2019.exe -s -a /s /f1"c:\app\dwg2019_uninstall.iss"
Source: https://help.hcltechsw.com/caa/3.0/topics/appacc_silent_install_t.html
There's another way to uninstall an app by searching for it in the Registry, and using the UninstallString (this sample code uses powershell on windows 10):
# Get all installed apps from Registry
$Apps = #()
$Apps += Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" # 32 Bit
$Apps += Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" # 64 Bit
# Uninstall My App
$my_app = $Apps | Where-Object{$_.DisplayName -eq "The Name Of My App"}
$uninstall_string = " /C " + $my_app.UninstallString+' /S'
Start-Process -FilePath "cmd.exe" -ArgumentList $uninstall_string -Wait
if you don't know the exact full display name of your app, you can print the "Apps" array to a file, and search there:
$Apps | Out-File C:\filename.txt
I was working on a silent uninstall of an InstallShield installer and was running into similar issues. What was posted here did not work or help. After lots and lots of trial and error I did find that for some reason when I used the -uninst option for both the creating the response file and running the silent uninstall I had success. In case anyone runs into a similiar issue and stumbles upon this thread I wanted to share. I am not sure why but adding -uninst did change the contents of the response file.
In my example creating response file: "C:\Program Files (x86)\InstallShield Installation Information\{0D20ACF2-CEE1-4523-BFCF-389BC4CC81FB}\setup.exe" -runfromtemp -l0x0409 -removeonly -uninst -r -f1"c:\uninstall.iss"
Then I could finally get the silent uninstall to function as expected: "C:\Program Files (x86)\InstallShield Installation Information\{0D20ACF2-CEE1-4523-BFCF-389BC4CC81FB}\setup.exe" -runfromtemp -l0x0409 -removeonly -uninst -s -f1"c:\uninstall.iss"