File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,16 @@ function Test-RegistryPathAndValue {
82
82
catch {
83
83
}
84
84
85
+ try {
86
+ $path = $path -replace " HKLM:\\SOFTWARE\\" , " HKLM:\\SOFTWARE\\WOW6432Node\\"
87
+ if (Test-Path $path ) {
88
+ Get-ItemProperty - Path $path | Select-Object - ExpandProperty $value - ErrorAction Stop | Out-Null
89
+ return $true
90
+ }
91
+ }
92
+ catch {
93
+ }
94
+
85
95
return $false
86
96
}
87
97
@@ -100,6 +110,11 @@ function Test-InstallWindowsSdk([string] $WindowsSDKVersion) {
100
110
if (Test-RegistryPathAndValue - Path $WindowsSDKInstalledRegPath - Value " $WindowsSDKOptions " ) {
101
111
# It appears we have what we need. Double check the disk
102
112
$sdkRoot = Get-ItemProperty - Path $WindowsSDKRegPath | Select-Object - ExpandProperty $WindowsSDKRegRootKey
113
+ if (! $sdkRoot ) {
114
+ $WindowsSDKRegPath = $WindowsSDKRegPath -replace " HKLM:\\SOFTWARE\\" , " HKLM:\\SOFTWARE\\WOW6432Node\\"
115
+ $sdkRoot = Get-ItemProperty - Path $WindowsSDKRegPath | Select-Object - ExpandProperty $WindowsSDKRegRootKey
116
+ }
117
+
103
118
if ($sdkRoot ) {
104
119
if (Test-Path $sdkRoot ) {
105
120
$refPath = Join-Path $sdkRoot " References\$WindowsSDKVersion "
You can’t perform that action at this time.
0 commit comments