I am running an MSI on a remote machine using PsExec using this command:
psexec -accepteula \\$(remote-machine-fqdn) -s cmd /c "msiexec.exe /qn /I $(path-to-msi) /Lv $(path-to-log-file)"
This works fine the first time, in that installs the application.
However, subsequent runs (and this is being run as part of a CI build in TFS) causes multiple versions of the application to appear in 'Add and Remove Programs'. If I run the installers myself (log on to the server, click on the MSI, etc.), then it upgrades correctly so the problem does not appear to be in installer itself.
I think the problem is to do with running as the system account (the -s switch in the PsExec command), but I can see no reason why this should be happening. Anyone seen this before?
Try passing ALLUSERS=1 public property to msi while fresh and upgrade installations.
Related
I am trying to download and silently install Anaconda on user's computer by using a batch file. The command that is used in my batch files is according to the original documentation of Anaconda. However, every time I run this batch of code, it gives me an error that says:
Installation for all users requires an elevated prompt.
This however only happens when I set the installation type to AllUsers. If I set the installation type to JustMe, it will be able to download and install Anaconda.
curl "https://repo.continuum.io/archive/Anaconda2-4.3.0.1-Windows-x86.exe" -o "prerequisites\\Anaconda2-4.3.0.1-Windows-x86.exe"
%cd%\prerequisites\Anaconda2-4.3.0.1-Windows-x86.exe /InstallationType=AllUsers /RegisterPython=1 /S /D=C:\Anaconda
Unfortunately, I need to find a way to set the installation type to AllUsers. I had also tried running the batch file using administrator mode but to no avail. Can anyone tell me what I am missing out? I've been on this for days and still could not find the correct solution to this.
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.
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.
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.