mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-19 22:42:35 +01:00
fixes #59342
This commit is contained in:
+10
-2
@@ -992,6 +992,14 @@ var
|
||||
begin
|
||||
Result := True;
|
||||
|
||||
#if "user" == InstallTarget
|
||||
if not WizardSilent() and IsAdminLoggedOn() then begin
|
||||
if MsgBox('This User Installer is not meant to be run as an Administrator. If you would like to install VS Code for all users in this system, download the System Installer instead from https://code.visualstudio.com. Are you sure you want to continue?', mbError, MB_OKCANCEL) = IDCANCEL then begin
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
#endif
|
||||
|
||||
#if "user" == InstallTarget
|
||||
#if "ia32" == Arch
|
||||
#define IncompatibleArchRootKey "HKLM32"
|
||||
@@ -999,12 +1007,12 @@ begin
|
||||
#define IncompatibleArchRootKey "HKLM64"
|
||||
#endif
|
||||
|
||||
if not WizardSilent() then begin
|
||||
if Result and not WizardSilent() then begin
|
||||
RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleTargetAppId}', 2, 38) + '_is1';
|
||||
|
||||
if RegKeyExists({#IncompatibleArchRootKey}, RegKey) then begin
|
||||
if MsgBox('{#NameShort} is already installed on this system for all users. We recommend first uninstalling that version before installing this one. Are you sure you want to continue the installation?', mbConfirmation, MB_YESNO) = IDNO then begin
|
||||
Result := false;
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user