How can I create an MSI using WIX that can run in passive mode?
If I double click on the msi it should launch in passive mode. This should be equivalent of running MSI package with /passive or /qb!- command line option. This is required to start the MSI installation from another application.
Is there any way of embedding command line options into MSI package?
Please post ideas that would help?
Just don't use UIRef to include any UI: If the .msi package doesn't have dialogs in it, MSI will run it with basic UI (the equivalent of /qb-).
Related
I used advanced installer for my project and I can install my .exe using wizard,
but I want to perform it using command line so something which can help silent installation with advanced installer ?
just use /exenoui /qn command line arguments for a silent install
I am going for a silent installation for one of my msi exe. The goal is to get the installer to run silently. I understand and know how to run it silently. The task at hand is that when I run it silently the OS restarts. So I implemented an additional flag to take care of the restart along with my silent flags. Below is the command I run for silent and no restart.
JumpyJackGame.exe /s /v/qn /norestart
The problem I am running into is the .exe does not even run when I add the /norestart command
What project type are you using? And do you use a Suite project (essentially a bundle of several setups delivered as a single setup.exe) or just a regular project wrapped in a normal setup.exe launcher?
See the official help for these different setup.exe types:
Setup.exe and Update.exe Command-Line Parameters
Advanced UI and Suite/Advanced UI Setup.exe Command-Line Parameters
If you use a regular Basic MSI (which you should for its standards compliance), then you might be able to do this:
Setup.exe /s /v"/qn REBOOT=ReallySuppress"
See more samples in the documentation. The REBOOT=ReallySuppress should stop rebooting from "normal causes". A custom action designed to do so may still be able to force-restart the system, but that is terrible design if implemented in such a manner (it should register the need to reboot only).
I will add a link in the morning - when I get time - to a previous answer on the different setup.exe types.
I have a Windows Universal App that needs to be sideloaded. I am using NSIS with a powershell script to install it. I would like to have the NSIS installer enable app sideloading in the Windows settings. I have already looked at the documentation from Microsoft about enabling app sideloading (https://msdn.microsoft.com/library/windows/apps/xaml/dn706236.aspx).
If I run the powershell command from the documentation to set the registry in a standalone powershell window it works fine and I can install the app. However, when I put the registry command inside the installer it doesn't work. I have tried using both Powershell and NSIS to set the registry. Using the WriteRegDWORD command from NSIS and the reg add command from Powershell both say that they succeeded. Reading back the values produces the correct value. If I try to set the registry using Set-ItemProperty in the Powershell script it complains that the path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock doesn't exist.
There doesn't seem to be any way to tell whether sideloading is enabled or not from Powershell. Even outside of the installer context checking the registry is not a valid solution because enabling sideloading via Windows Settings doesn't set the registry.
So my current solution is to try to install the app. If the install fails, check the error message and see if it's complaining about sideloading not being enabled. If that is the case then open up Windows Settings to the developer features page and pop up a message saying that sideloading needs to be enabled in order to continue. Then after Windows Settings is closed reattempt to install the app.
Is it possible to enable sideloading from an NSIS installer? Or is it possible to do a check to see if sideloading is enabled or not?
64-bit versions of Windows have a 64-bit and a 32-bit "version" of the registry, this means that what you see in Regedit might not be the same as what a 32-bit application sees.
Use the SetRegView instruction to change the view used by the installer.
Process Monitor is a useful tool to debug registry issues like this...
I am running a silent install of an msi driver install, at the end it has a popup that requires the user to hit "OK". I am unable to see this during silent mode or passive mode, is there a way in powershell that I can execute this and force it to pass-through? Anyway to hit "ok" to this without showing the user it is running will be the best option.
PowerShell simply invokes the installation process. The Windows Installer service is responsible for interpreting the MSI file and handling installation correctly. If Windows Installer is preventing the window from being displayed, then PowerShell won't be able to see it either.
Make sure you're calling msiexec.exe correctly:
msiexec /i <path to MSI> /q /l*v "$env:TEMP\install.log"
That runs it quietly (use /qb for just a simple, passive dialog-based install). If it still pops up a dialog, you need to contact the owner of the MSI package and have them fix it. They're breaking the Windows Installer guidelines and there's really no good workaround for it.
I'm evaluating install4j in our company.
We build a win32 installer and we are trying to set up a continuous integration environment to test it.
The CI server is able to upload the installer to the windows target machine (which is a virtualized environment) using FTP, and run batch script that looks like
cd c:\tmp\upload\
my_installer.exe -q -varfile response.varfile -console
Currently we're using the trial version of install4j 5.
When the installer is ran from the command line (cmd.exe over remote desktop) I get a popup window that warns about the trial version.
Installation is frozen until I click ok.
When the installer is ran from telnet the command just hangs and never returns. I believe the reason is that popup window.
To fully evaluate install4j we need to be able see how it fits our CI process.
Is there any workaround for this?
This is a restriction of the evaluation version, with a permanent license key the evaluation dialog will not be shown and the problem will go away.