trying to patch quicken with this script i think im missing a silent install command any suggestions would be great
$Path = $env:TEMP; $Installer = "Greenshot-INSTALLER-1.2.10.6-RELEASE.exe"; Invoke-WebRequest "https://assistant.quicken.com/patch/QW27.1.47.11MPatch.EXE" -OutFile $Path$Installer; Start-Process -FilePath $Path$Installer -Args "/silent /install" -Verb RunAs -Wait; Remove-Item $Path$Installer
when I run the script it fails (exceeding the timeout for completion I'm deploying it from PDQ inventory with admin credentials)
I tried this below command line to download and install CCleaner using PowerShell. But I got errors, it was a guess try, and I would appreciate if you could modify to a working command.
powershell.exe -Command "$Path = $env:TEMP; $Installer = 'ccsetup578.exe'; Invoke-WebRequest 'https://www.ccleaner.com/ccleaner/download/standard' -OutFile $Path$Installer; Start-Process -FilePath $Path$Installer -Args '/silent /install' -Verb RunAs -Wait; Remove-Item $Path$Installer"
"https://www.ccleaner.com/ccleaner/download/standard" - .html, not .exe
need
Invoke-WebRequest -Uri "https://download.ccleaner.com/ccsetup578.exe" -OutFile "$env:Temp\ccsetup578.exe"
P.S. Ccleaner - placebo
Use C:\Windows\System32\cleanmgr.exe /LOWDisk
This is actual code I tried. Please find the screenshot of the error here https://i.stack.imgur.com/yMWeQ.png
#echo off
powershell.exe -Command $Path = $env:TEMP; $Installer = "chrome_installer.exe"; Invoke-WebRequest "https://dl.google.com/chrome/install/latest/chrome_installer.exe" -OutFile $Path$Installer; Start-Process -FilePath $Path$Installer -Args "/silent /install" -Verb RunAs -Wait; Remove-Item $Path$Installer
enter image description here
Posting an answer because the code looks horrible in a comment:
Double quote the entire string after -Command, this is the entire command sent to powershell then single quote the internals (which in the original had double quotes).
powershell.exe -Command "$Path = $env:TEMP; $Installer = 'chrome_installer.exe'; Invoke-WebRequest 'https://dl.google.com/chrome/install/latest/chrome_installer.exe' -OutFile $Path$Installer; Start-Process -FilePath $Path$Installer -Args '/silent /install' -Verb RunAs -Wait; Remove-Item $Path$Installer"
I am using docker with powershell. I want to download and install webdeploy .msi
I am using the following code:
RUN Invoke-WebRequest http://download.microsoft.com/download/0/1/D/01DC28EA-638C-4A22-A57B-4CEF97755C6C/WebDeploy_x86_en-US.msi -OutFile webdeploy.msi; \
Start-Process msiexec -Wait -ArgumentList /q, /i, -PassThru, webdeploy.msi ; \
Remove-Item -Force webdeploy.msi
When I run:
docker build -t test.
Everything goes fine.
When I then check the folder "Program Files (x86)" inside the container I dont see any folder "IIS".
I also tried:
RUN Invoke-WebRequest http://download.microsoft.com/download/0/1/D/01DC28EA-638C-4A22-A57B-4CEF97755C6C/WebDeploy_x86_en-US.msi -OutFile webdeploy.msi; \
Start-Process msiexec -Wait -ArgumentList /q, /i, webdeploy.msi ; \
Remove-Item -Force webdeploy.msi
Some help would be appreciated.
I'm trying to write a script to download an install Azure Service Fabric SDK, runtime and tools into a few servers.
My issue is that the installer provided here is a Web Installer, and does not support silent mode.
I found a guy that solved this issue here. His code:
# Install Service Fabric Runtime
Invoke-WebRequest "http://download.microsoft.com/download/3/2/1/3217654F-6882-4CEA-BD51-49287EDECE9B/MicrosoftServiceFabric.6.0.232.9494.exe" -OutFile "C:\ServiceFabricRuntime.exe" -UseBasicParsing; \
Start-Process "C:\ServiceFabricRuntime.exe" -ArgumentList '/AcceptEULA', '/QUIET' -NoNewWindow -Wait; \
rm "C:\ServiceFabricRuntime.exe"
# Install Service Fabric SDK
Invoke-WebRequest "http://download.microsoft.com/download/3/2/1/3217654F-6882-4CEA-BD51-49287EDECE9B/MicrosoftServiceFabricSDK.2.8.232.msi" -OutFile "C:\ServiceFabricSDK.msi" -UseBasicParsing; \
Start-Process "msiexec" -ArgumentList '/i', 'C:\ServiceFabricSDK.msi', '/passive', '/quiet', '/norestart', '/qn' -NoNewWindow -Wait; \
rm "C:\ServiceFabricSDK.msi"
As you can see, he's using direct links to the .msi installers (as well as other guys are doing in other threads like these two answers.).
So my questions is, how do i get a direct link to the msi with the latest version of these installers?
And the follow up question would be, is there a universal link that will automatically download the latest version of these tools?
Thanks in advance.
I know this is not exactly what you asked for but you can use Web Platform Installer Command Line to install WebPI products silently. The idea is to download WebPICMD and run installation of Service Fabric SDK from the cmd line. The powershell script can look like this:
Invoke-WebRequest "https://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi" -OutFile "C:\WebPlatformInstaller.msi" -UseBasicParsing;
Start-Process "msiexec" -ArgumentList '/i', 'C:\WebPlatformInstaller.msi', '/passive', '/quiet', '/norestart', '/qn' -NoNewWindow -Wait;
rm "C:\WebPlatformInstaller.msi"
WebPICMD.exe /Install /Products:MicrosoftAzure-ServiceFabric-CoreSDK /AcceptEULA
Product MicrosoftAzure-ServiceFabric-CoreSDK will install latest version of Service Fabric SDK and Service Fabric Runtime silently.
If you want to install something different from the WebPI run :
WebPICMD.exe /List /ListOption:All
This command will list all of the available products, just grab the id of the product and run install command.
More about WebPICMD here.
To add on the answer above, if WebPlatformCMD gives you Windows' UAC consent window issues, you can use PSEXEC tools to run the installer as system account, avoiding that problem.
Example code:
Invoke-WebRequest "https://go.microsoft.com/fwlink/?LinkId=287166" -OutFile "$env:temp\WebPlatformInstaller_amd64_en-US.msi" -UseBasicParsing
Start-Process "msiexec" -ArgumentList "/i $env:temp\WebPlatformInstaller_amd64_en-US.msi /passive /quiet /norestart /qn" -NoNewWindow -Wait
$psToolsPath = "$env:temp\pstools"
New-Item $psToolsPath -ItemType directory -force -erroraction silentlycontinue
Invoke-WebRequest -Uri https://download.sysinternals.com/files/PSTools.zip -OutFile $psToolsPath\PSTools.zip
Expand-Archive "$psToolsPath\PSTools.zip" $psToolsPath -force
cd $psToolsPath
Start-Process psexec64 -ArgumentList "-s /accepteula WebPICMD.exe /Install /Products:MicrosoftAzure-ServiceFabric-CoreSDK /AcceptEULA"
Small note on SteppingRazor's answer above.
You can ease out the ArgumentList Parameter value like this:
Start-Process "msiexec" -ArgumentList "/i C:\WebPlatformInstaller.msi /passive /quiet /norestart /qn -NoNewWindow -Wait
Instead of
Start-Process "msiexec" -ArgumentList '/i', 'C:\WebPlatformInstaller.msi', '/passive', '/quiet', '/norestart', '/qn' -NoNewWindow -Wait;
Then using variables in the string is also easier.