Why does my installer not run while using the /norestart flag? - operating-system

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.

Related

How i can install crystal report silent mode using InstallShield?

I create a Setup with Installshield 2010. my setup has a prerequisites for reporting viewer so i want to install CR_Runtime13.0.12.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\CRRuntime_64bit_13_0_12\CRRuntime_64bit_13_0_12.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.12 silently.
at the end i Attached installshield command page and my help to this Question.
There are solutions in the StackOverFlow it does not Clear.
Thanks
You only need to add the msi to the Files To Include. Installshield does the rest.
Try to change the command line only to
/qb /norestart
PS:
I think the command is "/qn /norestart" and not qb.
Remove everything else.
Try it

Find argument list for an installation exe

I am a complete Noob on Windows and, for the first time of my life, I have to make a Powershell script to install various services on a server. From what I understood, silent installations are made this way:
Start-Process "C:\Path\To\some_installer.exe" -ArgumentList "/some /argument" -Wait -PassThru
But I cant figure a way to identify what the arguments should be for this given .exe. On Linux, I would launch the installer and answer to the prompts one by one to know what the arguments are supposed to be. Then:
(echo arg1; echo arg2) | my command
But since Start-Process does not display a similar behavior (or I am not using it properly), I am lost. I tried the -RedirectStandardOutput but getting nothing in the output file. How do you identify the argument list to provide?
Just like Linux, Windows has many package installation tools. The difference is that the Windows installers are mostly designed for GUI. So there is no standard for CLI. For each installation, you need to check for the installer.
If it's an MSI file, you can use the Microsoft docs. If it's an executable, you need to check for the installer. Many software use common installation wizards, but many of them use custom ones.
If you want to use it like Linux, you can use scoop or chocolatey. You can have a local repository in your network then share. Or just use internet. Then you can have silent installation by default.

Silent MSI Popup

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.

Canopy Silent Installation

We want to use Canopy in our University. Now i need a option for a silent installation. Hopefully this does exists. ;-) I'm able to install Canopy silent with the msi package with this command:
msiexec.exe /i canopy.msi /q
But the problem is that this is a user install. I can't find any Option to install Canopy for All Users. Have someone any idee?
Thanks a lot!
I have not tried this, but it looks as if adding ALLUSERS=1 should do it. Also, you must explicitly run the command in a terminal with escalated privileges, as described at https://support.enthought.com/entries/23736288-Windows-on-some-systems-admin-users-cannot-immediately-install-for-all-users-
Finally, whether you are installing for one user or many, note that running the MSI only installs Canopy Core. For a user to actually use the Canopy application or Canopy User Python, you must also run the application's initial setup. For scripting this, see this section of the user's guide: http://docs.enthought.com/canopy/configure/canopy-cli.html . You might find the final section most pertinent to your requirements.

I have made an installer for MyProgram but the uninstall shortcut that it creates leaves behind empty folders

I have created an installer for MyProgram using the Visual Studio Installer (Visual Studio Setup Project). It is called "MyProgram Setup.msi". It installs the program fine and if it is uninstalled using the Add/Remove Programs control panel then everything gets removed as it should.
The problem is that I want to add a shortcut to the "User's Programs Menu" under the program shortcut called "Uninstall MyProgram". I have tried doing this in 3 different ways and in all 3 ways if MyProgram is uninstalled using that shortcut, the uninstall will leave behind 2 empty folders ("...Program Files\MyCompany\" and "...Program Files\MyCompany\MyProgram\").
Here are the 3 ways that I have tried to make an uninstaller shortcut:
1) A shortcut to a batch or script file
Uninstall MyProgram.bat:
#ECHO OFF
msiexec /uninstall {MyGUID}
Uninstall MyProgram.vbs:
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("START /B msiexec /uninstall {MyGUID}")
Set objShell = Nothing
2) Editing the MSI file using Orca.exe
I found out how to do this using this guide: http://www.codeproject.com/KB/install/MSIShortcuts.aspx
I added the Shortcut Entry to the Shortcut table. Uninstalling worked but it still left behind the 2 empty folders when using this shortcut.
3) From code within MyProgram.exe
I modified MyProgram.exe to take a "/uninstall" command line parameter to run "msiexec.exe /uninstall {MyGUID}" and exit itself. Similar to this solution: http://www.codeproject.com/KB/install/DeployUninstall.aspx
None of these attempts created a shortcut which can uninstall the program as well as the program's base folders. I don't want to switch to some other installer product such as Inno Setup, NSIS, or WiX.
If for whatever reason manually running msiexec /x {MyGUID} doesn't remove all folders, then it's an issue with your setup or something you're doing in your application.
For more information about creating an uninstall shortcut with WiX, check out this blog post which goes into quite a bit of detail. Based on the information shown in the blog post you should be able to work out how to stick with your existing technology and use some variation on the (2) method you mention.
It seems that this is a bug in the Visual Studio Installer. I have decided to use WiX instead. It is able to create the uninstall shortcut with correct functionality.