Sorry for the newbie-ish question, but for all my years, I've never dealt with windows installation except as a user and I'm not sure how to start this.
I have two 3rd party packages to install. One I know is msi based but the other I have not found out yet. It comes with a setup.exe and a wrapper.exe - which we use to install.
Both installation prompt the user for language and a number of various options.
I need to wrap or do something to make these unattended installations.
I may be able to get some property information and I've read Silent installation of a MSI package - is that how I go about doing this? There will be a boat load of properties.
Basically, how do I go about wrapping the setup.exe and building / providing some type of response file.
thanks,
jon
Try this procedure to test if the setup is an MSI:
In the folder where your setup.exe is located, hold down shift, and right click in an empty space. Click "Open new command window here".
Type in setup.exe /a and let the setup start. This should launch an "admin install" if the setup.exe is an MSI setup at all. If you see a way to specify a path, define one and press next. This should now extract all files from within the setup.exe exposing the MSI file.
Once you have the MSI file extracted, it can in most cases be installed via a standard msiexec.exe command line like this: msiexec.exe /i setup.msi
To learn how to install an MSI file silently, check this thread:
How to interactive a silently installing msi? (Progress data and cancel it)
Just one final question: are you delivering these setups as a product, or are you trying to install to your work network or similar?
If those wrapper/setup programs don't have a silent mode then the whole process can't be silent. As far as the MSI files are concerned, the msiexec command line stuff is what you need, including specifying properties on the command line, such as TARGETDIR- if the default is wrong, and TRANSFORMS= assuming the language choice is a transform choice. If you turn on Windows Installer logging policy (or the wrappers let you create a verbose log) you'll see what command lines the wrappers use, so duplicate them except you'd add a /qn type of option to make them silent. If they require elevation to admin to install you'd have to launch them from an admin prompt because a silent install won't ask for elevation on UAC systems.
Related
I have msi file for iisnode, my machine is winx64. I want to install iisnode in preferred location. When I run the msi file it is installed, by default at C:\programFiles
I want to install in different location, because, TFS server will be deploying and replacing artifact inside the iisnode\www. It is not good idea to have replacing contents inside C:programFiles.
I tried msiexec.exe /a yarn-1.10.1.msi TARGETDIR=C:\cygwin64\home but didn't succeed,I have in the pic below (installation package cannot be opened)
If anyone have suceeded in installing msi file in different location when customization doesn't exist will be great, thank you
Firstly, I'm not sure why your screenshot specifies an /a switch for an administrative installation? You want to use /i instead for a normal installation.
Use this command line (/qb for a 'basic' user interface, or change to /qn for a silent installation):
msiexec /i yarn-1.10.1.msi INSTALLDIR=c:\cygwin64\home /qb
Not sure if you are trying to install the app or creating administrative installation?
but the above mentioned error suggests that the yarn-1.10.1.msi is not available in C:\iisnode1 folder. Could you please check that once.
I'm running into an issue using installshield as installerproject for my windows service.
I have an exe which I can run with -I
which installs my project as windows service.
This executes fine as I can set the param in the last dialog where "Show Launch Program" is set true.
But now when I'm uninstalling the whole program it should run the command
/Program Files(x86)/company/app/main.exe
command with -U parameter.
But I can only specify custom action to run after the main.exe has already been deleted.
Does anyone knows a way to run my custom action before the uninstallation process deletes my files?
The problem was with the installed version of installshield.
With the Limited Edition (LE) you are just able to create custom actions in some dedicated steps and not everywhere while installing.
I've written now an own command line file which I'm providing together with the SETUP.exe.
I have setup.msi file. I need to run the installation from the command line in silent mode. It is also necessary to specify the path where will this installation. I tried to use TARGETDIR and INSTALLDIR parameters, but the installation going is in the default folder:
msiexec.exe /i c:\setup.msi TARGETDIR="c:\result" /qb
Also if you run this command again, the installation will not happen, because msiexec think that the product is already installed. In this case, I need to get the product installation in the specified directory and the version value in the registry has been updated.
How can I install product in a specific directory regardless of whether the product is installed or not.
Basically, your commandline is not wrong. But, which variable is the correct one, is strongly dependent on the msi package itself, it is not a rule, that TARGETDIR works. At least it works for MSI files following best practices. Normally TARGETDIR is correct, and for InstallShield-builds is INSTALLDIR working best.
But if someone has authored the folder directly as ProgramFilesFolder, then this is fixed.
Download Orca or better InstEd or a similar tool and you have to look inside the MSI file.
Your second question:
"How can I install product in a specific directory regardless of whether the product is installed or not?"
This is not directly possible. Windows Installer has rules, and these don't allow multiple installation in different directories without further effort:
Moreover I am not sure why do you want this:
Here is a bit more knowledge for this:
Normally, everyone who wants to install in another directory, first uninstalls the product. That is standard practice. With commandline parameter /x you can uninstall it. Then install with a new path.
Your are correct, if you install a second time with your (same) command line, nothing will happen or change. Instead of an uninstall a repair (correction) is possible. Use the additional parameters REINSTALL=ALL REINSTALLMODE=vemus for this as a good default.
But as said, it is not possible to change installation path with this.
If you really mean this: For having installed multiple "copies" of the same software in different directories, things are a bit tricky with MSI. I recommand professional MSI knowledge for this so maybe you would need paid consult for that. Most people use copy scripts instead of MSI for such things. But when you want to have real multiple setup versions installed, search for MSDN entry "Installing Multiple Instances with Instance Transforms" as a first starting point.
I use powershell to check if it's already installed and install it if it's not already.
x86 MSI:
((Get-ItemProperty HKLM:\\Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* | Where { $_.DisplayName -like \"*[APPLICATION_NAME]*\" }) -ne $null)
X64 MSI:
((Get-ItemProperty HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\* | Where { $_.DisplayName -like \"*[APPLICATION_NAME]*\" }) -ne $null)
You can take the result and store it in a variable if you want such as $ApplicationInstalled and then condition your installation based on the result.
if (-not $ApplicationInstalled)
{
#MSI Install Commmand
}
I have been trying to install a msi file using cmd. The command looks like
C:\Windows\system32>msiexec.exe -q -i "Installer.msi"
But every time I run this the window for help options is opened for msi instead of running the installer. What could be the problem?
First, you need to specify the full path to the MSI file. Also, the command line is really picky if you are specifying anything else, and sometimes it doesn't like spaces between value=proprtyname. Those errors will give you the help screen because you got the syntax wrong in some way.
Note that the MSI file will not install successfully in silent mode if it requires elevation. It won't ask for the elevation prompt if you are in silent mode. That means you should try the command line install from an elevated prompt.
I think msiexec.exe /i installer.msi /qn should work.
See here for a similar thread on serverfault: https://serverfault.com/questions/30068/silent-install-of-msi/67001#67001
To deal with the complicated msiexec.exe command line interface, try this free tool from Installation tool developer Altiris: http://www2.wise.com/filelib/WICLB.exe - broken link resurrected from Wayback machine. Seeing as the tool was freeware I assume that is legal.
Please run the download by virustotal.com for safety.
Here is a screenshot:
I have an InstallShield 2009 Basic MSI project that I've modified to load the 3.5 SP1 redistributable for the .NET framework. It loads fine but as soon as it finishes it displays a prompt saying the system has to reboot, and you can either say yes and it will reboot, or no and it will stop the install.
I then went in and edited the .NET Framework 3.5 Service Pack 1 (Web Download) redistributable using InstallShield's prerequisite editor. I changed the behavior if it needs a reboot to 'Note it, fail to resume if the machine is rebooted, and reboot after the installation'. I interpreted that as meaning the reboot prompt would not be shown until the end of the install, but it still showed up in the same place.
Is there a way to suppress the prompt until the end of the install? Do I need to pick a different option from that drop-down in the pre-req editor?
Bonus question: if I need to run my install unattended, is there a way to automatically have it reboot after the entire install is finished if one is needed?
EDIT:
The command switches mentioned below would probably work, but in the case of running the install unattended it will be launched from another program, and I really don't want to modify that app just for this one case. Here's a better question: is a reboot really required after installing .NET 3.5 SP1, or is it one of those things where a reboot would be good but is not absolutely needed for programs to start using the 3.5 framework?
If you type msiexec /? in the Start -> Run box, you'll get a screen with command line options for the MSI runtime, including the following:
Restart Options
/norestart
Do not restart after the installation is complete
/promptrestart
Prompts the user for restart if necessary
/forcerestart
Always restart the computer after installation
You can suppress the reboot prompt entirely by adding the following to the MSI's setup command line:
REBOOT=ReallySuppress
But then it won't prompt at the end of your complete install, as it sounds like you were hoping for; you're just stopping the prompting altogether.
As for your additional question, you can force a reboot with the following switch:
REBOOT=Force REBOOTPROMPT=Supress
Here you're telling the Windows Installer to prompt for a reboot always, and then suppressing the prompt so it just happens.