Unattended install of ilmerge - powershell

I'm trying to setup a large number of build agents and so far i can install all the dependencies silently (using powershell, nuget and chocolatey).
However i cannot install the tool IlMerge without the damn GUI popping up.
Ive tried all the usual msiexec switches and they are just ignored. does anyone know of a way of getting this tool on a box in an unattended way?
Or should i just repack the thing in zip/msi?
This is on windows server 2008 R2
If i run
Invoke-Expression "msiexec $installerPath\ilmerge.msi /passive"
I still get a security dialog.
Currently i'm just thinking ill do this:
Copy-Item x:\installs\ilmerge.exe "C:\Program Files (x86)\ILMerge"
seeing as its only one file.

Below worked for me, no security dialogs.
cp ILMerge.msi \\Server\admin$
winrs -r:Server ILMerge.msi /passive
dir "\\Server\C$\Program Files (x86)\Microsoft\ILMerge"

With chocolatey you would have just needed to specify -ia '/quiet' as the package was not silent by default. This was specified by the tag notSilent and it was also in the description (http://chocolatey.org/packages/ilmerge/2.11.1103.1).
The latest package is just the executable, so you can just install it. http://chocolatey.org/packages/ilmerge

Related

run install-package without it prompting to install nuget

I'm trying to install an msi using install-package on a group of remote computers, but I kept getting the interactive prompt to install nuget. Is there any way to turn off that prompt?
install-package software.msi
The provider 'nuget v2.8.5.208' is not installed.
nuget may be manually downloaded from
https://onegetcdn.azureedge.net/providers/Microsoft.PackageManagement.NuGetProvider-2.8.5.208.dll and installed.
Would you like PackageManagement to automatically download and install 'nuget' now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):
Apparently you CAN install raw MSIs from Install-Package. In order to not get prompted for the Nuget provider installation, as well as prevent other prompts from happening, running Install-Package with the MSI provider:
Install-Package -ProviderName msi -Force software.msi
Not saying it's impossible, but at the surface I don't see a way to pass additional arguments into the MSI for Powershell 6 and later (Powershell 5.1 does have an -AdditionalArguments parameter). So keep this in mind if you have MSI installers that do need additional parameters passed in. If I find a way to do this I will update the answer.
I think you're looking for msiexec, not Install-Package as the latter installs a specially formatted package from a repository.
If you want to install software.msi with msiexec, you can do so like this:
msiexec /i $pathToSoftwareMsi /qn
If you want to write the installation log to a file, you can add logging parameters:
msiexec /i $pathToSoftwareMsi /qn /l*v $pathToOutputLogFile
Explaining the Parameters
/i: Tells msiexec to install the package
/qn: the q tells msiexec to execute with no user interaction. The n sets the UI level to No UI. These are instrumental for ensuring the installer doesn't ask for input during an unattended installation.
/l*v: Log the output to the specified file. /l indicates you want to output the log to a file, and the *v indicates all logging options plus verbose.
You can see the full range of options by running msiexec /?
Nuget install command:
install-packageprovider nuget -force
Install-Package is used to install NuGet packages in the context of a .NET project mostly.
To install an msi, you can just run the msi or use msiexec. I found a good explanation here: https://powershellexplained.com/2016-10-21-powershell-installing-msi-files/

Installing MSI in Jenkins through pushtool or plugins

I want to install MSI on my remote machine.Earlier I was using final builder which has an option to use pushtool to install MSI(pacakage) on servers.Now I have moved to jenkins and I am looking for any plugins which can be used to install the MSI .Another approach is calling pushtool.exe by powershell scripts.
Start-Process -FilePath "D:\PushInstall\PushInstall.exe" -ArgumentList "D:\PushInstall\installation.thom.DEV1.xml" -Wait
Even I gave -I option whhich stands for installation. But still it's not working.Can anyone help to solve this issue?

What is a good product for installing a Windows service on 15 to 30 machines quickly?

We have a Windows service which I'd like to run from a lot of machines. Right now we login and install the service manually on each machine when we need to update the services. This is a very time consuming process. Is there a tool which makes this easy to do?
Also, sometimes when we install upgrades we need to change the config files. Are there any tools that also support changing config files easily as part of the workflow? We were looking at RedGate's Deployment Manager but it only supports editing "appSettings" and "connectionStrings" elements and not other stuff in the config files.
First you want to make a clean, well behaving MSI. Windows Installer XML and IsWiX has a great story for that.
Once you have an MSI, you want to install it silently on your 15 machines. There are many tools for this. SCCM is a huge investment and a lot of infrastructure. You might be able to just sling a .BAT file to do it.
robocopy /mir C:\package \machine1\c$\package
robocopy /mir C:\package \machine2\c$\package
...
psexec remote command on machine msiexec /I foo.msi /qn REBOOT=R /l*v c:\package\install.log

Uninstall from command-line using installshield

Is there any way of being able to force through an uninstall rather than an upgrade on InstallSheild?
I currently have a Setup.exe and a MSI file
but everyime I attemp the uninstall using the pre-recorded ISS if my install is older than the current version it first upgrades and If I run the same file again then it uninstalls,
now im wondering if there is a way where I could force it to uninsatll --- this is what I have currently
...\setup.exe" /x /s /f1C:\Remove.iss
Instead of using the setup.exe you've built, why not use the one cached on the machine? Check the Uninstall key for details (like path) and you might still be able to mix in your /s /f1C:\Remove.iss if the removal pages are similar enough.

SQL Compact Service Packs silent install parameters

my application needs SQL Compact SP1 and SP2 installed (Entity Framework), but there is nothing on MSDN where I can determine silent install parameters for those two files (SSCERuntime-ENU-x86.msi for SP1 and SSCERuntime-ENU.exe for SP2). And on top of that, 64bit SP1 needs to be installed like this: install x86 file and then install x64 file on 64bit machine. Any thoughts appreciated.
OK, I've figured that out myself - all you need is to take these install files, run CMD and run them with wrong parameter, for example: C:\SSCERuntime-ENU-x86.msi -myAwesomeFlag. Because of course given parameter will not be found, install process displays MessageBox with a list of all possible parameters and their options. This works for both servicepacks and .NET 4 installation package.
Generally speaking .msi install parameters are normalised compared to .exe (which can be anything the developper choose). I recommend using this command with those parameters for silent install: msiexec /i SSCERuntime_x86-ENU.msi /qn /norestart
q is for quiet
n is for No UI
norestart ensure that the computer doesn't reboot right now, this is useful if you deploy software with tools like SCCM, Chocolatey, etc. Otherwise if the software needs a reboot it will reboot the computer and if a user is working on it he will not be really happy ;)