I have successfully installed vcredist_x86.exe and vcredist_x64.exe on Windows Server 2008R2, 2012 and 2012R2 using:
start-process -FilePath "vcredist_x86.exe" -ArgumentList "/install /q /norestart" -Verb RunAs -wait
BUT
For some reason this does not work on 2008 (NOT R2), neither x86 or x64. I always get prompted. The file is being installed from a \share.
Help is much appriciated.
Thanks!
-wait parameter does not work with 2012 vcredist in W2008.
Related
While I am trying to install MSU manually in the windows 2019 server, I am getting one error like
"The update is not applicable to your computer". Because some alternative KB has been installed already. So it's not allowed to install the MSU that I want to install. It's fine.
But when I am trying to install the same MSU through PowerShell by below mentioned PowerShell commend I am not getting any error log. I need a script to show the error log; if its any error. It has to skip this MSU installation. Experts please help me one this. I am looking forward to hear from you.
Start-Process -FilePath "$env:SystemRoot\System32\wusa.exe" -ArgumentList "C:\MicrosoftEdge_KB\windows10.0-kb4520062-x64.msu /quiet /norestart" -Wait
I am trying to automate a Windows build in AWS Codebuild which require downloading Windows SDK with Debugging Tools for Windows installed.
I am able to install the Windows SDK using Visual Studio with some other files required.
powershell -c "Start-Process -FilePath 'vs_community.exe' -ArgumentList \"--quiet\",
\"--norestart\" , \"--add Microsoft.VisualStudio.Workload.Universal\",
\"--add Microsoft.VisualStudio.Workload.NativeDesktop\",
\"--add Microsoft.VisualStudio.Component.VC.ATLMFC\",
\"--add Microsoft.VisualStudio.Component.Windows10SDK.19041\",
\"--includeRecommended\" -Wait;"
The build requires Debugging Tools for Windows enabled in Windows SDK which is straightforward in UI installation. But since I want to automate this, I am looking for a command line option to install Debugging Tools for Windows in Windows 10 SDK.
I was able to install Debugging Tools for Windows via standalone windows sdk installer through command line as below:
powershell -c "Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/?linkid=2120843' -OutFile winsdksetup.exe -UseBasicParsing ;"
winsdksetup.exe /features + /q /norestart
/features + selects all the features available in Windows SDK to install.
I have installed software using powershell command, for example 7zip:
Start-Process msiexec -ArgumentList '/I C:\Desktop\7z2106-x64.msi /quiet /passive /L*V "C:\Desktop\package.log"' -Wait -NoNewWindow
And then there are two problems:
How to check whether the software is successfully installed?
If installed successfully, How to start the software?
I need to solve the two problems with scripts instead of interactive interfaces. I haven't found a good solution. Can anyone help me? Thanks.
I have Windows running in a VMware VM, to which I connect via SSH. I can run a Command Prompt or a PowerShell. I'm trying to follow the instructions to install Visual Studio 2017 Build Tools from a command line. I download the installer from https://aka.ms/vs/15/release/vs_buildtools.exe and name it vsbt2017.exe, the "installation channel" from https://aka.ms/vs/15/release/channel and name it vs2017.chman, and I create an empty directory for the installation at C:\vs2017.
When I try this command in Command Prompt, it does not return immediately, waits a few seconds, then returns. My install path remains empty. No error message is printed to the terminal. %ERRORLEVEL% is 1.
start /wait .\vsbt2017.exe --quiet --wait --norestart --nocache --installPath C:\vs2017 --channelUri C:\vs2017.chman --installChannelUri C:\vs2017.chman --add "Microsoft.VisualStudio.Workload.VCTools;includeRecommended"
When I try this command in PowerShell, I get the same results. The analog of this command works for me for VSBT 2019, so it's really puzzling why it doesn't work for 2017.
Start-Process -FilePath C:\vsbt2017.exe -ArgumentList "--quiet --wait --norestart --nocache --installPath C:\vs2017 --channelUri C:\vs2017.chman --installChannelUri C:\vs2017.chman --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended" -Wait -PassThru
If it makes a difference, I already have VSBT 2019 installed on this VM, but I've read in Microsoft's documentation that multiple versions can be installed simultaneously.
Almost two years ago, I asked a similar question about the 2019 Build Tools installer. This time, I need to install the 2017 Build Tools. The reason is that I need to figure out why someone else's installation of Visual Studio 2017 doesn't work, so I need to test with their version. "Just install Visual Studio 2019" is not an acceptable answer to this question.
I want to make cppcheck a part of the build process for tfs builds. Is adding a command to the prebuild script the only way to run it? I am using PowerShell scripts and I added the line:
Start-Process -FilePath 'C:\Program Files (x86)\Cppcheck\cppcheck.exe' -ArgumentList $("--xml-version=2 . 2> cppcheck.xml") -NoNewWindow -Wait -WorkingDirectory $projectDirectory
However I cannot test it without checking in my changes into Git project. Also running this from Visual Studio 2013, where would I see the results of this check?