Skip to content

Instantly share code, notes, and snippets.

@recca0120
Forked from solodyagin/chocolatey.cmd
Created July 29, 2020 04:50
Show Gist options
  • Save recca0120/8d9062a40b2f29f4e7968e59e81a7455 to your computer and use it in GitHub Desktop.
Save recca0120/8d9062a40b2f29f4e7968e59e81a7455 to your computer and use it in GitHub Desktop.
(Chocolatey) Automatic installation script of programs
@echo off
net file 1>nul 2>nul
if "%errorlevel%" == "0" (goto admin)
:elevate
echo Set UAC = CreateObject^("Shell.Application"^) > "%Temp%\elevate.vbs"
set params = %*:"="
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%Temp%\elevate.vbs"
"%Temp%\elevate.vbs"
del "%Temp%\elevate.vbs"
exit /B
:admin
rem Install Chocolatey
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
rem Microsoft Visual C++ 2005 SP1 Redistributable ( https://chocolatey.org/packages/vcredist2005 )
rem choco install -y vcredist2005
rem Microsoft Visual C++ 2008 SP1 Redistributable ( https://chocolatey.org/packages/vcredist2008 )
rem choco install -y vcredist2008
rem Microsoft Visual C++ 2010 Redistributable ( https://chocolatey.org/packages/vcredist2010 )
rem choco install -y vcredist2010
rem Microsoft Visual C++ 2012 Redistributable ( https://chocolatey.org/packages/vcredist2012 )
rem choco install -y vcredist2012
rem Visual C++ Redistributable Packages for Visual Studio 2013 ( https://chocolatey.org/packages/vcredist2013 )
rem choco install -y vcredist2013
rem Microsoft Visual C++ Redistributable for Visual Studio 2015 Update 3 (with hotfix 2016-09-14) ( https://chocolatey.org/packages/vcredist2015 )
rem choco install -y vcredist2015
rem Microsoft Visual C++ Redistributable for Visual Studio 2017 ( https://chocolatey.org/packages/vcredist2017 )
rem choco install -y vcredist2017
rem 7-Zip ( https://chocolatey.org/packages/7zip )
rem choco install -y 7zip
rem LibreOffice Fresh ( https://chocolatey.org/packages/libreoffice-fresh )
rem choco install -y libreoffice-fresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment