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?
Related
I have an error in the PowerShell console with Chocolatey's link.
chocolatey's link error
If have not a solution, I need to learn how to install Chocolatey with the downloaded file "chocolatey.0.10.15.nupkg".
chocolatey's file .nupkg
Installing choco is a very common use case, including NuGet.
PowerShell already comes with a package manager that uses NuGet that it already installs by default. You can still install choco for other reasons, but for every day, normal PowerShell use, it's not needed.
Installing PowerShellGet
https://learn.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7
PowerShellGet is an in-box module in the following releases Windows 10
or newer Windows Server 2016 or newer Windows Management Framework
(WMF) 5.0 or newer PowerShell 6
Set your security level in your PowerShell session.
# Required for use with web SSL sites
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
If your ExecutionPolicy is set to AllSigned, then any script you run must be signed. Otherwise, set the ExecutionPolicy to RemoteSigned or ByPass in your user session.
How to Install Chocolatey using PowerShell
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression (
(New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')
)
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/
I am trying to install Perforce Helix using Chef. Install file is an .exe file with 4 options available to install. I want to install 3 of them excluding one. Is there a way to identify which option to provide to it from command line. Currently I am able to install package in silent mode and with default settings using
installer_type :custom
options %W[
/s
/v/qn
].join(' ')
Any help is appreciated.
Thanks guys, I got the solution. I first installed the application and then removed P4ADMIN from it:
`installer_type :custom
options %W[
/s
/v"ADDLOCAL=ALL REMOVE=P4ADMIN /qn"
].join(' ')`
I'm trying to install Azure cmdlets using powershell, not the wizard provided by Microsoft.
That's because my script (which has Azure cmdlets) will be used in a new virtual machine located in Azure and if my script try to run some cmdlet of Azure, will fail for sure.
I would like to put the installation lines of the powershell cmdlets on the top of my script for install the whole cmdlets and after that, that my script execute the other cmdlets without problem.
So, anyone knows?
Thanks!
If you have the Web Platform Installer in the VM, you can use the script I posted at PowerShell Magazine.
http://www.powershellmagazine.com/2014/02/27/using-powershell-and-web-platform-installer-to-install-azure-powershell-cmdlets/
Or get the Windows Standalone installer from https://github.com/Azure/azure-sdk-tools/releases and use msiexec to install that.
If you want to use PowerShell to download the latest version too:
You can use Invoke-WebRequest to read the page (https://github.com/Azure/azure-sdk-tools/releases) and then get all links from that. You can then get all links that end with .msi and take the first link for download.
#Code not tested
$doc = Invoke-WebRequest 'https://github.com/Azure/azure-sdk-tools/releases'
$links = $doc.Links.Href
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