Is it possible for me to use MsiExec and set the install directory with the ProductVersion property as part of the path?
msiexec /i C:\myapp.msi INSTALLDIR=C:\MyApp\[ProductVersion]
You can't use a property on the command line like that. If [ProductVersion] is used in the directory table or to build up INSTALLDIR as part of the MSI, that would work fine. However, MSI properties have no meaning to the command interpeter.
You can set properties on the commandline like
msiexec /i PROPERTY=VALUE A:\Example.msi
(from: http://msdn.microsoft.com/en-us/library/windows/desktop/aa367988(v=vs.85).aspx)
You would need a script to query the MSI's Property table to obtain the ProductVersion and then use that to build your command line.
If this is your install and this is your desired behavior, then you'd be better off authoring a custom action to mutate the INSTALLDIR automatically. If this is not your install and this is just how you like to install the product then ServerFault is a better place to ask this.
Related
I'm trying to get a log from my install that uses a setup.exe. I can get a log with just setup.exe /V"/l\*v c:\temp\installlog.txt", but I want to pass the x parameter as well to get "Extra debugging information" and when I try setup.exe /V"/l*vx c:\temp\installlog.txt" I get:
1629: Invalid command line.
Any idea what I'm doing wrong? I have msiexec version 5 installed.
Ancient setup.exe: I tried with an ancient version of Installshield and the setup.exe for a Basic MSI worked as expected. I could pass in Setup.exe V"/L*v C:\Test1.log" and Setup.exe V"/L*vx C:\Test1.log" - both command lines worked and the resulting log files were different with the x adding more verbose nonsense :-). Verbose indeed.
Modern Suite Setups: I tried with InstallShield2018Premier.exe - a recent installer from Installshield, and it failed with that command line. I am pretty sure this latter file is an Installshield Suite setup.exe - it has to be. These suite setup.exe files (or whatever they are renamed to) are not the same as the setup.exe files generated for a single MSI file. There are some details about this here (just my observations, needs verification): Regarding silent installation using Setup.exe generated using Installshield 2013 (.issuite) project file.
So I guess the first thing I would verify is that you are not using a suite setup.exe (as opposed to a regular setup.exe launcher). However, it does look like the command line without the x parameter did work for you, and then this theory doesn't make any sense. Posting anyway in case you tested with another setup.exe or something like that. There could also be changes to the regular setup.exe which makes it fall over on the x now, but it worked in earlier versions.
Since the above does not seem like a real answer, how about some longshot suggestions?
Did you try to disable your anti-virus while running with this switch? Just to rule this out in case the x initiates something funky.
Did you try and verify similar results on another computer? Maybe a virtual machine? (a very basic, clean one).
Is this an Installscript MSI? I would build a Basic MSI wrapped in a test setup.exe to see if the behavior is the same for a vanilla MSI file.
All I can think of at the moment.
UPDATE: OK, a couple of things.
Installscript MSI projects are very buggy in my experience. I would use a Basic MSI if at all possible. The resulting MSI files are also much more compatible with corporate deployment requirements.
Maybe Try This: It is possible that you can "hack" the compiled Installscript MSI setup to be able to install without the setup.exe wrapper. So you extract the files with an admin install going setup.exe /a and then you use this trick: How to deploy the Installshield MSI without having to run Setup.exe - in order to run the extracted MSI file using the normal msiexec.exe engine. So then you just go msiexec.exe /i MyMsi.Msi /L*Vx C:\Test.log /QN and see what you get.
It is also conceivable that there is a setting in Installscript MSI projects where you can directly specify a command line to pass to msiexec.exe for testing. I have no access to recent Installshield version and can not help you with this. Documentation might give you a clue.
Have you tried this?
setup.exe /s /v"/lvoicewarmupx! C:\temp\install.log"
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)
I building a installer for my application and want to install mysql With default Configure on user PC automatically. how to install mysql automatically without be user set Configure(example password,user,instance)? On linux
1.How i install MySQL on Linux with install4j ?
2.How to run .sh file in install4j?
You can run any third party installer with a "Run executable or batch file" action.
The mysql installer has a quiet mode that can be invoked like this:
msiexec /i "path to msi file" /qn INSTALLDIR="mysql installation dir"
For the "Run executable or batch file", you have to set the "Executable" property to
${installer:sys.system32Dir}\msiexec
and the "Arguments" property (in the "..." editor) to
${installer:sys.installationDir}\mysql.msi
/qn
INSTALLDIR=${installer:sys.programGroupDir}\mysql
If you add the mysql msi file to the distribution tree at the top level and it's named 'mysql.msi' and if you want to install it to %PROGRAMFILES%\mysql.
Configuring the instance can be done with the MysqlInstanceConfig.exe helper, see https://dev.mysql.com/doc/refman/5.1/en/mysql-config-wizard-cmdline.html for more information.
I am doing an upgrade for the existing exe file using installshield. when installing the update , in files in use dialog I select the option to automatically close and restart the application instead of the other option to reboot the system.
But I get an extra window which tells me to restart the system again after installation is complete. How to disable this window? Please help :)
You can try to run the installation silently with REBOOT=ReallySuppress (update the paths). Please note that I haven't had the chance to test all these command lines:
msiexec.exe /I "C:\IsWiX.msi" /QN /L*V "C:\msilog.log" REBOOT=ReallySuppress
/I is for install
/QN is silent mode
/L* is verbose logging
If you have an EXE file instead of an MSI file I would extract the MSI to an administrative image (file extract from setup.exe basically) using the following command:
setup.exe /a
Then specify an extract location for the files in the EXE file. You can also run it directly with the Installshield command lines for EXE files. Something like:
Setup.exe /v"REBOOT=ReallySuppress /qn"
Or silently with logging:
Setup.exe /v"/l*v c:\test.log REBOOT=ReallySuppress /qn"
There are also some simplified command line macros from Microsoft. Most of the time these can be used. Other times you need the full command line interface.
I have an InstallScript function that runs fine when running during the install that I need to run during an uninstall. It is backing up the existing applications. I created a Custom Action for it and added it to the Execute Sequence after InstallValidate.
There is no log file generated, as far as I can tell for uninstalls, so I am having trouble figuring out why it fails with a "Feature Transfer Error" -1603.
I am pretty sure the function is not being called as I put a MessageBox as the first thing.
You should set the Install UI Condition or Install Exec Condition to
(REMOVE="ALL")OR(REMOVE="<feature_being_uninstalled>")
just in case you have or will in the future have multiple features being installed. (Unless of course, you only want to run the Custom Action in the case where the whole product is being uninstalled)
To run a custom action during uninstall, set its condition to REMOVE="ALL" in Install UI Condition or Install Exec Condition, which ever is applicable in your case.
To run a custom action when a product is already installed, the condition should be set to Installed.
To run a custom action when a product is not installed, the condition should be set to Not Installed.
I believe you can use the following msiexec command to log the uninstall:
msiexec /x YourProduct.msi /L*v logfile.txt
or
msiexec /x {Your Product/Package Code} /L*v logfile.txt