mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
@@ -81,7 +81,8 @@ function buildWin32Setup(arch, target) {
|
||||
AppMutex: product.win32MutexName,
|
||||
Arch: arch,
|
||||
AppId: arch === 'ia32' ? ia32AppId : x64AppId,
|
||||
IncompatibleAppId: arch === 'ia32' ? x64AppId : ia32AppId,
|
||||
IncompatibleTargetAppId: arch === 'ia32' ? product.win32AppId : product.win32x64AppId,
|
||||
IncompatibleArchAppId: arch === 'ia32' ? x64AppId : ia32AppId,
|
||||
AppUserId: product.win32AppUserModelId,
|
||||
ArchitecturesAllowed: arch === 'ia32' ? '' : 'x64',
|
||||
ArchitecturesInstallIn64BitMode: arch === 'ia32' ? '' : 'x64',
|
||||
|
||||
+14
-2
@@ -957,14 +957,26 @@ Root: {#EnvironmentRootKey}; Subkey: "{#EnvironmentKey}"; ValueType: expandsz; V
|
||||
// Don't allow installing conflicting architectures
|
||||
function InitializeSetup(): Boolean;
|
||||
var
|
||||
RegRootKey: String;
|
||||
RegKey: String;
|
||||
ThisArch: String;
|
||||
AltArch: String;
|
||||
begin
|
||||
Result := True;
|
||||
|
||||
if IsWin64 then begin
|
||||
RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleAppId}', 2, 38) + '_is1';
|
||||
#if "user" == InstallTarget
|
||||
if '{#Arch}' = 'ia32' then RegRootKey := 'HKLM32' else RegRootKey := 'HKLM64';
|
||||
RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleTargetAppId}', 2, 38) + '_is1';
|
||||
|
||||
if RegKeyExists(RegRootKey, RegKey) then begin
|
||||
if MsgBox('{#NameShort} is already installed on this system for all users. Are you sure you want to install it for this user?', mbConfirmation, MB_YESNO) = IDNO then begin
|
||||
Result := false;
|
||||
end;
|
||||
end;
|
||||
#endif
|
||||
|
||||
if Result and IsWin64 then begin
|
||||
RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleArchAppId}', 2, 38) + '_is1';
|
||||
|
||||
if '{#Arch}' = 'ia32' then begin
|
||||
Result := not RegKeyExists({#Uninstall64RootKey}, RegKey);
|
||||
|
||||
Reference in New Issue
Block a user