diff --git a/tools/CorrelationTestbed/InSandboxScript.ps1 b/tools/CorrelationTestbed/InSandboxScript.ps1 index b788ec4266..5dd6778e94 100644 --- a/tools/CorrelationTestbed/InSandboxScript.ps1 +++ b/tools/CorrelationTestbed/InSandboxScript.ps1 @@ -6,9 +6,16 @@ Param( [String] $OutputPath, [Switch] $UseDev, [Switch] $MetadataCollection, - [String] $System32Path + [String] $System32Path, + [Int32] $GeoID = 0 ) +if ($GeoID -ne 0) +{ + Write-Host "--> Setting GeoID to $GeoID" + Set-WinHomeLocation -GeoId $GeoID +} + function Get-ARPTable { $registry_paths = @('HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*') return Get-ItemProperty $registry_paths -ErrorAction SilentlyContinue | diff --git a/tools/CorrelationTestbed/Test-CorrelationInSandbox.ps1 b/tools/CorrelationTestbed/Test-CorrelationInSandbox.ps1 index 8ac148428b..37722a04a2 100644 --- a/tools/CorrelationTestbed/Test-CorrelationInSandbox.ps1 +++ b/tools/CorrelationTestbed/Test-CorrelationInSandbox.ps1 @@ -242,6 +242,8 @@ if ($MetadataCollection) Copy-Item -Path $WingetUtilPath -Destination $tempFolder -Force } +$HostGeoID = (Get-WinHomeLocation).GeoId + # Copy main script $mainPs1FileName = 'InSandboxScript.ps1' @@ -262,7 +264,7 @@ foreach ($packageIdentifier in $PackageIdentifiers) $dependenciesPathsInSandbox = "@('$($vcLibsUwp.pathInSandbox)')" } - $bootstrapPs1Content = ".\$mainPs1FileName -DesktopAppInstallerDependencyPath @($dependenciesPathsInSandbox) -PackageIdentifier '$packageIdentifier' -SourceName '$Source' -OutputPath '$outPathInSandbox' -System32Path '$system32PathInSandbox'" + $bootstrapPs1Content = ".\$mainPs1FileName -DesktopAppInstallerDependencyPath @($dependenciesPathsInSandbox) -PackageIdentifier '$packageIdentifier' -SourceName '$Source' -OutputPath '$outPathInSandbox' -System32Path '$system32PathInSandbox' -GeoID $HostGeoID" if ($UseDev) {