I'm building a deployment for a work environment, and doing it with Inno Setup. I wrap the other installers in one Inno-exe-File. It's working fine with other exe installers, but fails when it comes to MSI installers.
I don't know if there is any general problem, but it completely ignores my file association with the MSI exe (it works fine in Explorer, the association is ok).
Any ideas ? Probably there is some general problem..
Have the script launch Windows Installer just by executing the .MSI file will not work--the lookup of the default action to do when you open a file is done by the shell, but not automagically done by programs trying to launch things.
But the answer is simple: you just need to provide the msiexec.exe command line to launch them, something like this:
%windir%\system32\msiexec.exe /i <your_msi_filename> /qb-
Thanks to ewall I found this working for me:
Use a bat file for execution of all your MSIs, where you call each with full path, this way:
"C:\WINDOWS\System32\msiexec.exe" /i "C:\Programme\mySetup\tmp\InstallernameX" /qb-
Related
I have a kivy project in python.
I build an exe with Pyinstaller based on this project.
I have a .nsi compiled which builds me an .exe installeur based on the previous .exe.
Everything works !
I am actually scripting the proccess to make it easier.
PROBLEM: What is the line of command that build an .exe installer based on a .nsi and an .exe ?
(To be really precise, I want to replace the "open HM NSIS Edit software, find your file.nsi, right click on it, click on 'Compile and Execute'" by a command line on a Windows terminal)
Just pass the .nsi path to MakeNSIS:
"c:\Program Files\NSIS\MakeNSIS.exe "c:\mystuff\myinstaller.nsi"
It is possible to create extra defines with /D but you would know if your script requires 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:
Just getting started with PowerShell. I was running DOS .bat files in my post build events in VS and wanted to graduate up to PowerShell. Bat files were easy...CALL something.bat. I tried to do that with a PowerShell ps1 file and my trial-and-erroring got me to the following (first thing that worked...tried all the simple things first, obviously):
powershell -command "& {(powershell '$(ProjectDir)test.ps1')}"
Is there a shorthand version of this? I think the only thing that really bothers me is the redundant calls to the powershell executable, but that's probably only required because .ps1 files open in notepad by default on my machine (and I should keep the redundancy for deployment on other systems so I'm not reliant on the default program for a file type). Anyway, if there's unnecessary redundancy here, I'd love to know.
I'm very new to PowerShell, so any related insight is always appreciated.
I've used PowerShell as a post-build event in the past; now I lean towards using psake
(super simple build system) or just running a raw PowerShell script. Post-build events get messy, are inflexible, and have few advantages over doing the same thing in a build script.
EDIT: If you are still interested in using a post-build script, I've answered the question before here
According to the MSN, this should work nice:
powershell.exe "$(ProjectDir)test.ps1"
Edit: Found this
powershell.exe "& ""$(ProjectDir)test.ps1"""
I didn't check any MSDN, it simply works:
powershell $(ProjectDir)test.ps1
Btw. don't forget to set run privileges for BOTH versions of PowerShell -- 32-bit and 64-bit.
I was sort of happy with the elegant powershell $(ProjectDir) solution detailed here, but I ran into problems when starting/stopping IIS App Pools via WebAdministration's Start-WebAppPool and Stop-WebAppPool
I had better success with:
%WINDIR%\SysNative\WindowsPowerShell\v1.0\powershell.exe
i.e.
%WINDIR%\SysNative\WindowsPowerShell\v1.0\powershell.exe -Command "$(ProjectDir)Powershell\Stop-AppPool.ps1"
The reason turned out to be mixing of architectures, as detailed here (in the section "Using Windows PowerShell Scripts to Automate Tasks in Visual Studio"):
It's important that you use the virtual path of %WINDIR%\SysNative and
not the actual path of C:\Windows\System32. The reason for this is
that Visual Studio 2010 is a 32-bit application that needs to call the
64-bit version of powershell.exe to successfully load the
Microsoft.SharePoint.Powershell snap-in.