aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/getProgramFiles32bit.ps112
-rw-r--r--scripts/getProgramFilesPlatformBitness.ps112
2 files changed, 18 insertions, 6 deletions
diff --git a/scripts/getProgramFiles32bit.ps1 b/scripts/getProgramFiles32bit.ps1
index fd7167191..6b71915b1 100644
--- a/scripts/getProgramFiles32bit.ps1
+++ b/scripts/getProgramFiles32bit.ps1
@@ -3,9 +3,15 @@ param(
)
-if (Test-Path env:PROGRAMFILES`(X86`))
+$out = ${env:PROGRAMFILES(X86)}
+if ($out -eq $null)
{
- return ${env:PROGRAMFILES(X86)}
+ $out = ${env:PROGRAMFILES}
}
-return ${env:PROGRAMFILES} \ No newline at end of file
+if ($out -eq $null)
+{
+ throw "Could not find [Program Files 32-bit]"
+}
+
+return $out \ No newline at end of file
diff --git a/scripts/getProgramFilesPlatformBitness.ps1 b/scripts/getProgramFilesPlatformBitness.ps1
index 6d0a513ca..2be4c1137 100644
--- a/scripts/getProgramFilesPlatformBitness.ps1
+++ b/scripts/getProgramFilesPlatformBitness.ps1
@@ -3,9 +3,15 @@ param(
)
-if (Test-Path env:ProgramW6432)
+$out = ${env:ProgramW6432}
+if ($out -eq $null)
{
- return ${env:ProgramW6432}
+ $out = ${env:PROGRAMFILES}
}
-return ${env:PROGRAMFILES} \ No newline at end of file
+if ($out -eq $null)
+{
+ throw "Could not find [Program Files Platform Bitness]"
+}
+
+return $out \ No newline at end of file