This commit is contained in:
Joao Moreno 2018-09-26 15:57:42 +02:00
parent f652102ec2
commit cdc21cd886

View file

@ -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;