-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows installer: Add option to add to *system* PATH in admin install mode #4495
Conversation
Is there a way I can test (with built artifacts)? Happy to prove it works or not. |
That'd be awesome, as that's the missing part - I've just blindly added some (Delphi...) code so far. I believe you should be able to download the |
@@ -16,7 +16,7 @@ AppVerName=LDC {#LDCVersion} | |||
ArchitecturesAllowed=x64 | |||
; Enable /CURRENTUSER cmdline option to install for current user only, requiring no admin privileges. | |||
; This affects the default install dir (override with /DIR="x:\dirname") and the registry root key (HKCU, not HKLM). | |||
PrivilegesRequiredOverridesAllowed=commandline | |||
PrivilegesRequiredOverridesAllowed=dialog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://jrsoftware.org/ishelp/index.php?topic=setup_privilegesrequiredoverridesallowed, this should retain the CLI option but also ask whether an admin or local-user-only install should be performed.
@@ -40,7 +40,8 @@ Name: lib32; Description: "x86 libraries"; Types: full | |||
|
|||
[Run] | |||
; note: not added to PATH for silent installs with /SILENT or /VERYSILENT | |||
Filename: "{cmd}"; Parameters: "/c echo hello"; Check: not IsInEnvPath; BeforeInstall: AddToEnvPath; Description: "Add to PATH environment variable for current user"; Flags: postinstall skipifsilent runhidden nowait | |||
Filename: "{cmd}"; Parameters: "/c echo hello"; Check: not IsInUserEnvPath; BeforeInstall: AddToUserEnvPath; Description: "Add to PATH environment variable for current user"; Flags: postinstall skipifsilent runhidden nowait | |||
Filename: "{cmd}"; Parameters: "/c echo hello"; Check: IsAdminInstallMode and not IsInSystemEnvPath; BeforeInstall: AddToSystemEnvPath; Description: "Add to system PATH environment variable"; Flags: postinstall skipifsilent runhidden nowait unchecked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be unchecked by default and only visible in admin install mode.
Tested this out:
I'll look and see if I can figure out which Key needs setting. |
d9b72f3
to
11d4027
Compare
11d4027
to
146e0ef
Compare
Just tested the updated artifact, and works as designed. Thanks! |
Perfect, thank you! |
Resolves #4494.