Skip to content

Commit

Permalink
vcredist2015
Browse files Browse the repository at this point in the history
  • Loading branch information
jivkok committed Aug 31, 2015
1 parent 75007d2 commit 63be5e1
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
Binary file added vcredist2015/ms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions vcredist2015/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
$packageName = 'vcredist2015'
$installerType = 'exe'
$url = 'http://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe'
$url64 = 'http://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe'
$silentArgs = '/Q'
$validExitCodes = @(
0, # success
3010, # success, restart required
2147781575, # pending restart required
-2147185721 # pending restart required
)

Install-ChocolateyPackage -PackageName "$packageName" -FileType "$installerType" -Url "$url" -Url64bit "$url64" -SilentArgs "$silentArgs" -ValidExitCodes $validExitCodes

if (Get-ProcessorBits 64) {
Install-ChocolateyPackage -PackageName "$packageName" -FileType "$installerType" -Url "$url" -SilentArgs "$silentArgs" -ValidExitCodes $validExitCodes
}
28 changes: 28 additions & 0 deletions vcredist2015/tools/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$packageName = 'vcredist2015'
$packageSearch = 'Microsoft Visual C++ 2015 Redistributable'
$installerType = 'exe'
$silentArgs = '/uninstall /quiet'
$validExitCodes = @(
0, # success
3010, # success, restart required
2147781575, # pending restart required
-2147185721 # pending restart required
)

try {
Get-ItemProperty -Path @( 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' ) `
-ErrorAction:SilentlyContinue `
| Where-Object { $_.DisplayName -Like "$packageSearch*" } `
| Select-Object BundleCachePath -Unique `
| ForEach-Object {
$file = $_.BundleCachePath
Uninstall-ChocolateyPackage -PackageName "$packageName" `
-FileType "$installerType" `
-SilentArgs "$silentArgs" `
-File "$file" `
-ValidExitCodes $validExitCodes
}
} catch {
throw $_.Exception
}
22 changes: 22 additions & 0 deletions vcredist2015/vcredist2015.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata>
<id>vcredist2015</id>
<title>Visual C++ Redistributable Packages for Visual Studio 2015</title>
<version>14.0.23026.0</version>
<authors>Microsoft</authors>
<owners>Jivko Kolev</owners>
<projectUrl>https://www.microsoft.com/en-us/download/details.aspx?id=48145</projectUrl>
<iconUrl>https://github.com/jivkok/Chocolatey-Packages/raw/master/vcredist2015/ms.png</iconUrl>
<licenseUrl>http://msdn.microsoft.com/en-US/cc300389.aspx</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>Run-time components that are required to run C++ applications built using Visual Studio 2015</summary>
<description>
The Visual C++ Redistributable Packages install run-time components of Visual C++ libraries. These components are required to run C++ applications that are developed using Visual Studio 2015 and link dynamically to Visual C++ libraries. These package can be used to run such applications on a computer even if it does not have Visual Studio 2015 installed. These packages install run-time components of these libraries: C Runtime (CRT), Standard C++, MFC, C++ AMP, and OpenMP.
</description>
<tags>visual studio 2015 c++ redistributable</tags>
</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>

0 comments on commit 63be5e1

Please sign in to comment.