@@ -2089,6 +2089,7 @@ function New-MSIPackage
2089
2089
$wixLightExePath = Join-Path $wixToolsetBinPath " Light.exe"
2090
2090
2091
2091
$ProductSemanticVersion = Get-PackageSemanticVersion - Version $ProductVersion
2092
+ $isPreview = $ProductSemanticVersion -like ' *-*'
2092
2093
$ProductVersion = Get-PackageVersionAsMajorMinorBuildRevision - Version $ProductVersion
2093
2094
2094
2095
$assetsInSourcePath = Join-Path $ProductSourcePath ' assets'
@@ -2109,6 +2110,17 @@ function New-MSIPackage
2109
2110
[Environment ]::SetEnvironmentVariable(" ProductVersion" , $ProductVersion , " Process" )
2110
2111
[Environment ]::SetEnvironmentVariable(" ProductSemanticVersion" , $ProductSemanticVersion , " Process" )
2111
2112
[Environment ]::SetEnvironmentVariable(" ProductVersionWithName" , $productVersionWithName , " Process" )
2113
+ if (! $isPreview )
2114
+ {
2115
+ [Environment ]::SetEnvironmentVariable(" UpgradeCodeX64" , ' 31ab5147-9a97-4452-8443-d9709f0516e1' , " Process" )
2116
+ [Environment ]::SetEnvironmentVariable(" UpgradeCodeX86" , ' 1d00683b-0f84-4db8-a64f-2f98ad42fe06' , " Process" )
2117
+ }
2118
+ else
2119
+ {
2120
+ [Environment ]::SetEnvironmentVariable(" UpgradeCodeX64" , ' 39243d76-adaf-42b1-94fb-16ecf83237c8' , " Process" )
2121
+ [Environment ]::SetEnvironmentVariable(" UpgradeCodeX86" , ' 86abcfbd-1ccc-4a88-b8b2-0facfde29094' , " Process" )
2122
+ }
2123
+
2112
2124
$ProductProgFilesDir = " ProgramFiles64Folder"
2113
2125
if ($ProductTargetArchitecture -eq " x86" )
2114
2126
{
0 commit comments