mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 13:43:07 +00:00
fixes #59342
This commit is contained in:
parent
f652102ec2
commit
cdc21cd886
1 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue