Created
May 22, 2013 12:42
-
-
Save mpicker0/5627265 to your computer and use it in GitHub Desktop.
Conversion of VsDevCmd.bat and VCVarsQueryRegistry.bat into PowerShell. These scripts set up your command-line environment to run Visual Studio 2012 commands. I was annoyed that there were only batch file versions, so I converted them to PowerShell. Very little attempt has been made to make these scripts PowerShell-like; they are more or less st…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([Parameter(Mandatory=$false)][string]$Query32Bit = "32bit", | |
[Parameter(Mandatory=$false)][string]$Query64Bit = "64bit") | |
Function Get-WindowsSdkDir() | |
{ | |
if (${Global:WindowsSdkDir}) | |
{ | |
Remove-Variable -Name "WindowsSdkDir" -Scope Global | |
} | |
Get-WindowsSdkDirHelper32 HKLM | |
if (-not $WindowsSdkDir) { Get-WindowsSdkDirHelper32 HKCU } | |
if (-not $WindowsSdkDir) { Get-WindowsSdkDirHelper64 HKLM } | |
if (-not $WindowsSdkDir) { Get-WindowsSdkDirHelper64 HKCU } | |
${env:WindowsSdkDir} = $WindowsSdkDir | |
} | |
Function Get-WindowsSdkDirHelper32([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$WindowsSdkDir = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "InstallationFolder" | |
if ($WindowsSdkDir) | |
{ | |
${Global:WindowsSdkDir} = $WindowsSdkDir | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-WindowsSdkDirHelper64([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$WindowsSdkDir = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.0" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "InstallationFolder" | |
if ($WindowsSdkDir) | |
{ | |
${Global:WindowsSdkDir} = $WindowsSdkDir | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ########################################################################## | |
Function Get-ExtensionSdkDir() | |
{ | |
if (Test-Path "${env:ProgramFiles}\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\Microsoft.VCLibs\11.0\SDKManifest.xml") | |
{ | |
${env:ExtensionSdkDir} = "${env:ProgramFiles}\Microsoft SDKs\Windows\v8.0\ExtensionSDKs" | |
} | |
if (Test-Path "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\Microsoft.VCLibs\11.0\SDKManifest.xml") | |
{ | |
${env:ExtensionSdkDir} = "${env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v8.0\ExtensionSDKs" | |
} | |
} | |
# ########################################################################## | |
Function Get-WindowsSdkDir_old() | |
{ | |
if (${Global:WindowsSdkDir_old}) | |
{ | |
Remove-Variable -Name "WindowsSdkDir_old" -Scope Global | |
} | |
Get-WindowsSdkDirHelper32_old HKLM | |
if (-not $WindowsSdkDir_old) { Get-WindowsSdkDirHelper32_old HKCU } | |
if (-not $WindowsSdkDir_old) { Get-WindowsSdkDirHelper64_old HKLM } | |
if (-not $WindowsSdkDir_old) { Get-WindowsSdkDirHelper64_old HKCU } | |
${env:WindowsSdkDir_old} = $WindowsSdkDir_old | |
} | |
Function Get-WindowsSdkDirHelper32_old([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$WindowsSdkDir_old = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0a" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "InstallationFolder" | |
if ($WindowsSdkDir_old) | |
{ | |
${Global:WindowsSdkDir_old} = $WindowsSdkDir_old | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-WindowsSdkDirHelper64_old([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$WindowsSdkDir_old = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.0a" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "InstallationFolder" | |
if ($WindowsSdkDir_old) | |
{ | |
${Global:WindowsSdkDir_old} = $WindowsSdkDir_old | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ########################################################################## | |
Function Get-WindowsSdkDir_35() | |
{ | |
if (${Global:WindowsSdkDir_35}) | |
{ | |
Remove-Variable -Name "WindowsSdkDir_35" -Scope Global | |
} | |
Get-WindowsSdkDirHelper32_35 HKLM | |
if (-not $WindowsSdkDir_35) { Get-WindowsSdkDirHelper32_35 HKCU } | |
if (-not $WindowsSdkDir_35) { Get-WindowsSdkDirHelper64_35 HKLM } | |
if (-not $WindowsSdkDir_35) { Get-WindowsSdkDirHelper64_35 HKCU } | |
${env:WindowsSdkDir_35} = $WindowsSdkDir_35 | |
} | |
Function Get-WindowsSdkDirHelper32_35([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$WindowsSdkDir_35 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "InstallationFolder" | |
if ($WindowsSdkDir_35) | |
{ | |
${Global:WindowsSdkDir_35} = $WindowsSdkDir_35 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-WindowsSdkDirHelper64_35([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$WindowsSdkDir_35 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "InstallationFolder" | |
if ($WindowsSdkDir_35) | |
{ | |
${Global:WindowsSdkDir_35} = $WindowsSdkDir_35 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ########################################################################## | |
Function Get-VSInstallDir() | |
{ | |
if (${Global:VSINSTALLDIR}) | |
{ | |
Remove-Variable -Name "VSINSTALLDIR" -Scope Global | |
} | |
Get-VSInstallDirHelper32 HKLM | |
if (-not $VSINSTALLDIR) { Get-VSInstallDirHelper32 HKCU } | |
if (-not $VSINSTALLDIR) { Get-VSInstallDirHelper64 HKLM } | |
if (-not $VSINSTALLDIR) { Get-VSInstallDirHelper64 HKCU } | |
${env:VSINSTALLDIR} = $VSINSTALLDIR | |
} | |
Function Get-VSInstallDirHelper32([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$VSINSTALLDIR = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "11.0" | |
if ($VSINSTALLDIR) | |
{ | |
${Global:VSINSTALLDIR} = $VSINSTALLDIR | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-VSInstallDirHelper64([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$VSINSTALLDIR = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "11.0" | |
if ($VSINSTALLDIR) | |
{ | |
${Global:VSINSTALLDIR} = $VSINSTALLDIR | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ########################################################################## | |
Function Get-VCInstallDir() | |
{ | |
if (${Global:VCINSTALLDIR}) | |
{ | |
Remove-Variable -Name "VCINSTALLDIR" -Scope Global | |
} | |
Get-VCInstallDirHelper32 HKLM | |
if (-not $VCINSTALLDIR) { Get-VCInstallDirHelper32 HKCU } | |
if (-not $VCINSTALLDIR) { Get-VCInstallDirHelper64 HKLM } | |
if (-not $VCINSTALLDIR) { Get-VCInstallDirHelper64 HKCU } | |
${env:VCINSTALLDIR} = $VCINSTALLDIR | |
} | |
Function Get-VCInstallDirHelper32([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$VCINSTALLDIR = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "11.0" | |
if ($VCINSTALLDIR) | |
{ | |
${Global:VCINSTALLDIR} = $VCINSTALLDIR | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-VCInstallDirHelper64([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$VCINSTALLDIR = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "11.0" | |
if ($VCINSTALLDIR) | |
{ | |
${Global:VCINSTALLDIR} = $VCINSTALLDIR | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ########################################################################## | |
Function Get-FSharpInstallDir() | |
{ | |
if (${Global:FSHARPINSTALLDIR}) | |
{ | |
Remove-Variable -Name "FSHARPINSTALLDIR" -Scope Global | |
} | |
Get-FSharpInstallDirHelper32 HKLM | |
if (-not $FSHARPINSTALLDIR) { Get-FSharpInstallDirHelper32 HKCU } | |
if (-not $FSHARPINSTALLDIR) { Get-FSharpInstallDirHelper64 HKLM } | |
if (-not $FSHARPINSTALLDIR) { Get-FSharpInstallDirHelper64 HKCU } | |
${env:FSHARPINSTALLDIR} = $FSHARPINSTALLDIR | |
} | |
Function Get-FSharpInstallDirHelper32([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FSHARPINSTALLDIR = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\F#" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "ProductDir" | |
if ($FSHARPINSTALLDIR) | |
{ | |
${Global:FSHARPINSTALLDIR} = $FSHARPINSTALLDIR | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-FSharpInstallDirHelper64([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FSHARPINSTALLDIR = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\F#" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "ProductDir" | |
if ($FSHARPINSTALLDIR) | |
{ | |
${Global:FSHARPINSTALLDIR} = $FSHARPINSTALLDIR | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ########################################################################## | |
Function Get-FrameworkDir32() | |
{ | |
if (${Global:FrameworkDIR32}) | |
{ | |
Remove-Variable -Name "FrameworkDIR32" -Scope Global | |
} | |
Get-FrameworkDir32Helper32 HKLM | |
if (-not $FrameworkDIR32) { Get-FrameworkDir32Helper32 HKCU } | |
if (-not $FrameworkDIR32) { Get-FrameworkDir32Helper64 HKLM } | |
if (-not $FrameworkDIR32) { Get-FrameworkDir32Helper64 HKCU } | |
${env:FrameworkDIR32} = $FrameworkDIR32 | |
} | |
Function Get-FrameworkDir32Helper32([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FrameworkDIR32 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "FrameworkDir32" | |
if ($FrameworkDIR32) | |
{ | |
${Global:FrameworkDIR32} = $FrameworkDIR32 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-FrameworkDir32Helper64([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FrameworkDIR32 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "FrameworkDir32" | |
if ($FrameworkDIR32) | |
{ | |
${Global:FrameworkDIR32} = $FrameworkDIR32 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ########################################################################## | |
Function Get-FrameworkDir64() | |
{ | |
if (${Global:FrameworkDIR64}) | |
{ | |
Remove-Variable -Name "FrameworkDIR64" -Scope Global | |
} | |
Get-FrameworkDir64Helper32 HKLM | |
if (-not $FrameworkDIR64) { Get-FrameworkDir64Helper32 HKCU } | |
if (-not $FrameworkDIR64) { Get-FrameworkDir64Helper64 HKLM } | |
if (-not $FrameworkDIR64) { Get-FrameworkDir64Helper64 HKCU } | |
${env:FrameworkDIR64} = $FrameworkDIR64 | |
} | |
Function Get-FrameworkDir64Helper32([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FrameworkDIR64 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "FrameworkDir64" | |
if ($FrameworkDIR64) | |
{ | |
${Global:FrameworkDIR64} = $FrameworkDIR64 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-FrameworkDir64Helper64([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FrameworkDIR64 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "FrameworkDir64" | |
if ($FrameworkDIR64) | |
{ | |
${Global:FrameworkDIR64} = $FrameworkDIR64 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ########################################################################## | |
Function Get-FrameworkVer32() | |
{ | |
if (${Global:FrameworkVersion32}) | |
{ | |
Remove-Variable -Name "FrameworkVersion32" -Scope Global | |
} | |
Get-FrameworkVer32Helper32 HKLM | |
if (-not $FrameworkVersion32) { Get-FrameworkVer32Helper32 HKCU } | |
if (-not $FrameworkVersion32) { Get-FrameworkVer32Helper64 HKLM } | |
if (-not $FrameworkVersion32) { Get-FrameworkVer32Helper64 HKCU } | |
${env:FrameworkVersion32} = $FrameworkVersion32 | |
} | |
Function Get-FrameworkVer32Helper32([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FrameworkVersion32 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "FrameworkVer32" | |
if ($FrameworkVersion32) | |
{ | |
${Global:FrameworkVersion32} = $FrameworkVersion32 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-FrameworkVer32Helper64([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FrameworkVersion32 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "FrameworkVer32" | |
if ($FrameworkVersion32) | |
{ | |
${Global:FrameworkVersion32} = $FrameworkVersion32 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ########################################################################## | |
Function Get-FrameworkVer64() | |
{ | |
if (${Global:FrameworkVersion64}) | |
{ | |
Remove-Variable -Name "FrameworkVersion64" -Scope Global | |
} | |
Get-FrameworkVer64Helper32 HKLM | |
if (-not $FrameworkVersion64) { Get-FrameworkVer64Helper32 HKCU } | |
if (-not $FrameworkVersion64) { Get-FrameworkVer64Helper64 HKLM } | |
if (-not $FrameworkVersion64) { Get-FrameworkVer64Helper64 HKCU } | |
${env:FrameworkVersion64} = $FrameworkVersion64 | |
} | |
Function Get-FrameworkVer64Helper32([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FrameworkVersion64 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "FrameworkVer64" | |
if ($FrameworkVersion64) | |
{ | |
${Global:FrameworkVersion64} = $FrameworkVersion64 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-FrameworkVer64Helper64([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$FrameworkVersion64 = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "FrameworkVer64" | |
if ($FrameworkVersion64) | |
{ | |
${Global:FrameworkVersion64} = $FrameworkVersion64 | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# Entry point | |
Get-WindowsSdkDir | |
Get-WindowsSdkDir_old | |
Get-WindowsSdkDir_35 | |
Get-ExtensionSdkDir | |
Get-VSInstallDir | |
Get-VCInstallDir | |
Get-FSharpInstallDir | |
if ($Query32Bit -eq "32bit") | |
{ | |
Get-FrameworkDir32 | |
Get-FrameworkVer32 | |
} | |
if ($Query64Bit -eq "64bit") | |
{ | |
Get-FrameworkDir64 | |
Get-FrameworkVer64 | |
} | |
${env:Framework35Version} = "v3.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-VSCommonToolsDir() | |
{ | |
if (${Global:VS110COMNTOOLS}) | |
{ | |
Remove-Variable -Name "VS110COMNTOOLS" -Scope Global | |
} | |
Get-VSCommonToolsDirHelper32 HKLM | |
if (-not $VS110COMNTOOLS) { Get-VSCommonToolsDirHelper32 HKCU } | |
if (-not $VS110COMNTOOLS) { Get-VSCommonToolsDirHelper64 HKLM } | |
if (-not $VS110COMNTOOLS) { Get-VSCommonToolsDirHelper64 HKCU } | |
${env:VS110COMNTOOLS} = $VS110COMNTOOLS | |
} | |
Function Get-VSCommonToolsDirHelper32([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$VS110COMNTOOLS = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "11.0" | |
if ($VS110COMNTOOLS) | |
{ | |
${Global:VS110COMNTOOLS} = "${VS110COMNTOOLS}Common7\Tools\" | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
Function Get-VSCommonToolsDirHelper64([parameter(Mandatory = $true, Position = 0)][string]$Hive) | |
{ | |
Try | |
{ | |
$VS110COMNTOOLS = Get-ItemProperty -Path "${Hive}:\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" -ErrorAction Stop ` | |
| Select-Object -ExpandProperty "11.0" | |
if ($VS110COMNTOOLS) | |
{ | |
${Global:VS110COMNTOOLS} = "${VS110COMNTOOLS}Common7\Tools\" | |
} | |
} | |
Catch [System.Exception] {} | |
} | |
# ENTRY POINT | |
Get-VSCommonToolsDir | |
if (-not ${env:VS110COMNTOOLS}) | |
{ | |
Write-Error "ERROR: Cannot determine the location of the VS Common Tools folder." | |
exit | |
} | |
. (Join-Path $VS110COMNTOOLS VCVarsQueryRegistry.ps1) 32bit No64bit | |
if (-not ${env:VSINSTALLDIR}) | |
{ | |
Write-Error "ERROR: Cannot determine the location of the VS installation." | |
exit | |
} | |
if (-not ${env:FrameworkDir32}) | |
{ | |
Write-Error "ERROR: Cannot determine the location of the .NET Framework 32bit installation." | |
exit | |
} | |
if (-not ${env:FrameworkVersion32}) | |
{ | |
Write-Error "ERROR: Cannot determine the version of the .NET Framework 32bit installation." | |
exit | |
} | |
if (-not ${env:Framework35Version}) | |
{ | |
Write-Error "ERROR: Cannot determine the .NET Framework 3.5 version." | |
exit | |
} | |
${env:FrameworkDir} = ${env:FrameworkDir32} | |
${env:FrameworkVersion} = ${env:FrameworkVersion32} | |
if (${env:WindowsSdkDir_old}) | |
{ | |
${env:PATH} = "${env:WindowsSdkDir_old}bin\NETFX 4.0 Tools;${env:WindowsSdkDir_35};${env:PATH}" | |
} | |
if (${env:WindowsSdkDir}) | |
{ | |
${env:PATH} = "${env:WindowsSdkDir}bin\x86;${env:PATH}" | |
${env:INCLUDE} = "${env:WindowsSdkDir}include\shared;${env:WindowsSdkDir}include\um;${env:WindowsSdkDir}include\winrt;${env:INCLUDE}" | |
${env:LIB} = "${env:WindowsSdkDir}lib\win8\um\x86;${env:LIB}" | |
${env:LIBPATH} = "${env:WindowsSdkDir}References\CommonConfiguration\Neutral;${env:ExtensionSDKDir}\Microsoft.VCLibs\11.0\References\CommonConfiguration\neutral;${env:LIBPATH}" | |
} | |
# | |
# Root of Visual Studio IDE installed files. | |
# | |
${env:DevEnvDir} = "${env:VSINSTALLDIR}Common7\IDE\" | |
# PATH | |
# #### | |
if (Test-Path (Join-Path ${env:VSINSTALLDIR} "Team Tools\Performance Tools")) | |
{ | |
${env:PATH} = "${env:VSINSTALLDIR}Team Tools\Performance Tools;${env:PATH}" | |
} | |
if (Test-Path (Join-Path ${env:ProgramFiles} "HTML Help Workshop")) { ${env:PATH} = "${env:ProgramFiles}\HTML Help Workshop;${env:PATH}" } | |
if (Test-Path (Join-Path ${env:ProgramFiles(x86)} "HTML Help Workshop")) { ${env:PATH} = "${env:ProgramFiles(x86)}\HTML Help Workshop;${env:PATH}" } | |
if (Test-Path (Join-Path ${env:VCINSTALLDIR} "VCPackages")) { ${env:PATH} = "${env:VCINSTALLDIR}VCPackages;${env:PATH}" } | |
${env:PATH} = "${env:FrameworkDir}${env:Framework35Version};${env:PATH}" | |
${env:PATH} = "${env:FrameworkDir}${env:FrameworkVersion};${env:PATH}" | |
${env:PATH} = "${env:VSINSTALLDIR}Common7\Tools;${env:PATH}" | |
if (Test-Path (Join-Path ${env:VCINSTALLDIR} "BIN")) { ${env:PATH} = "${env:VCINSTALLDIR}BIN;${env:PATH}" } | |
${env:PATH} = "${env:DevEnvDir};${env:PATH}" | |
if (Test-Path (Join-Path ${env:VSINSTALLDIR} "VSTSDB\Deploy")) | |
{ | |
${env:PATH} = "${env:VSINSTALLDIR}VSTSDB\Deploy;${env:PATH}" | |
} | |
if (${env:FSHARPINSTALLDIR}) | |
{ | |
${env:PATH} = "${env:FSHARPINSTALLDIR};${env:PATH}" | |
} | |
if (Test-Path (Join-Path ${env:DevEnvDir} "CommonExtensions\Microsoft\TestWindow")) | |
{ | |
${env:PATH} = "${env:DevEnvDir}CommonExtensions\Microsoft\TestWindow;${env:PATH}" | |
} | |
# INCLUDE | |
# ####### | |
if (Test-Path (Join-Path ${env:VCINSTALLDIR} "ATLMFC\INCLUDE")) { ${env:INCLUDE} = "${env:VCINSTALLDIR}ATLMFC\INCLUDE;${env:INCLUDE}" } | |
if (Test-Path (Join-Path ${env:VCINSTALLDIR} "INCLUDE")) { ${env:INCLUDE} = "${env:VCINSTALLDIR}INCLUDE;${env:INCLUDE}" } | |
# LIB | |
# ### | |
if (Test-Path (Join-Path ${env:VCINSTALLDIR} "ATLMFC\LIB")) { ${env:LIB} = "${env:VCINSTALLDIR}ATLMFC\LIB;${env:LIB}" } | |
if (Test-Path (Join-Path ${env:VCINSTALLDIR} "LIB")) { ${env:LIB} = "${env:VCINSTALLDIR}LIB;${env:LIB}" } | |
# LIBPATH | |
# ####### | |
if (Test-Path (Join-Path ${env:VCINSTALLDIR} "ATLMFC\LIB")) { ${env:LIBPATH} = "${env:VCINSTALLDIR}ATLMFC\LIB;${env:LIBPATH}" } | |
if (Test-Path (Join-Path ${env:VCINSTALLDIR} "LIB")) { ${env:LIBPATH} = "${env:VCINSTALLDIR}LIB;${env:LIBPATH}" } | |
${env:LIBPATH} = "${env:FrameworkDir}${env:Framework35Version};${env:LIBPATH}" | |
${env:LIBPATH} = "${env:FrameworkDir}${env:FrameworkVersion};${env:LIBPATH}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment