Skip to content

Commit cdc21cd

Browse files
committed
1 parent f652102 commit cdc21cd

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

build/win32/code.iss

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,19 +992,27 @@ var
992992
begin
993993
Result := True;
994994
995+
#if "user" == InstallTarget
996+
if not WizardSilent() and IsAdminLoggedOn() then begin
997+
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
998+
Result := False;
999+
end;
1000+
end;
1001+
#endif
1002+
9951003
#if "user" == InstallTarget
9961004
#if "ia32" == Arch
9971005
#define IncompatibleArchRootKey "HKLM32"
9981006
#else
9991007
#define IncompatibleArchRootKey "HKLM64"
10001008
#endif
10011009
1002-
if not WizardSilent() then begin
1010+
if Result and not WizardSilent() then begin
10031011
RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleTargetAppId}', 2, 38) + '_is1';
10041012
10051013
if RegKeyExists({#IncompatibleArchRootKey}, RegKey) then begin
10061014
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
1007-
Result := false;
1015+
Result := False;
10081016
end;
10091017
end;
10101018
end;

0 commit comments

Comments
 (0)