diff --git a/UniGetUI.iss b/UniGetUI.iss index 1f08a3bc5d..a80093840b 100644 --- a/UniGetUI.iss +++ b/UniGetUI.iss @@ -321,7 +321,7 @@ Name: "portableinstall"; Description: "{cm:PortInst}"; GroupDescription: "{cm:In Name: "regularinstall"; Description: "{cm:RegInst}"; GroupDescription: "{cm:InstallType}"; Flags: exclusive Name: "regularinstall\startmenuicon"; Description: "{cm:RegStartMmenuIcon}"; GroupDescription: "{cm:ShCuts}"; Name: "regularinstall\desktopicon"; Description: "{cm:RegDesktopIcon}"; GroupDescription: "{cm:ShCuts}"; -Name: "regularinstall\addtopath"; Description: "{cm:RegAddToPath}"; Flags: unchecked; +Name: "regularinstall\addtopath"; Description: "{cm:RegAddToPath}"; [Registry] Root: HKCU; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "WingetUI"; ValueData: """{app}\UniGetUI.exe"" --daemon"; Flags: uninsdeletevalue noerror; Tasks: regularinstall; diff --git a/docs/CLI.md b/docs/CLI.md index ce9a11f89a..34c4ba40b2 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -13,9 +13,9 @@ macOS. It forwards arguments and terminal input/output, waits for each command t returns its exit code. Keep it with the rest of the installation; copying only the launcher elsewhere will not work. -- **Windows:** Select **Add to PATH** during a regular installation to run `uniget` from any - directory. This option is off by default and uses the user or system `PATH` according to - the install mode. Open a new terminal after installation. Without this option, run +- **Windows:** Keep **Add to PATH** selected during a regular installation to run `uniget` from + any directory. This option is on by default (upgrades keep your previous choice) and uses the + user or system `PATH` according to the install mode. Open a new terminal after installation. Without this option, run `.\uniget.exe` from the installation directory. - **Linux:** The `.deb` and `.rpm` packages expose `uniget` on `PATH`; from an extracted tarball, run `./uniget` in the directory containing `UniGetUI`. @@ -33,11 +33,11 @@ The commands below assume PowerShell is in the installation directory on Windows .\uniget.exe operation wait --id 123 --timeout 300 ``` -For a silent Windows installation, include `ADDTOPATH=1` to opt in, or `ADDTOPATH=0` to -explicitly deselect **Add to PATH**: +For a silent Windows installation, include `ADDTOPATH=0` to opt out, or `ADDTOPATH=1` to +explicitly select **Add to PATH** (for example, over a previously saved opt-out): ```powershell -.\UniGetUI.Installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART ADDTOPATH=1 +.\UniGetUI.Installer.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART ADDTOPATH=0 ``` The property name is case-insensitive and accepts only `0` or `1`. It overrides the saved diff --git a/docs/TUI.md b/docs/TUI.md index 3a52574fe9..4a680f5d7c 100644 --- a/docs/TUI.md +++ b/docs/TUI.md @@ -28,7 +28,7 @@ Otherwise, use the launcher included with your installation: | Linux | Installed `.deb` and `.rpm` packages provide `uniget tui`. From an extracted archive, open its folder and run `./uniget tui`. | | macOS | After installing in Applications, run `/Applications/UniGetUI.app/Contents/MacOS/uniget tui`. From an extracted archive, run `./uniget tui` in its folder. | -On Windows, selecting **Add to PATH** during installation lets you use `uniget` from any +On Windows, the **Add to PATH** installer option (on by default) lets you use `uniget` from any folder. Open a new terminal after installation. Portable installations do not change `PATH`; run the launcher from the portable folder. See [the CLI guide](CLI.md#quick-start) for more launch options and [portable mode](PORTABLE.md) for portable installation details. diff --git a/testing/automation/run-installer-path-tests.ps1 b/testing/automation/run-installer-path-tests.ps1 index 54405b93b9..7b977477ae 100644 --- a/testing/automation/run-installer-path-tests.ps1 +++ b/testing/automation/run-installer-path-tests.ps1 @@ -105,12 +105,12 @@ try { $ownerName = [Convert]::ToHexString([Security.Cryptography.SHA256]::HashData( [Text.Encoding]::Unicode.GetBytes($entry.ToLowerInvariant()))).ToLowerInvariant() $cases = @( - @{ Name = 'default-unchecked'; Args = @(); Path = 0; Before = 0 }, - @{ Name = 'alias-enable'; Args = @('ADDTOPATH=1'); Path = 1; Before = 0 }, - @{ Name = 'alias-disable'; Args = @('ADDTOPATH=0'); Path = 0; Before = 0 }, - @{ Name = 'case-insensitive'; Args = @('aDdToPaTh=1'); Path = 1; Before = 0 }, - @{ Name = 'same-value-repeated'; Args = @('ADDTOPATH=1', 'addtopath=1'); Path = 1; Before = 0 }, - @{ Name = 'same-zero-repeated'; Args = @('ADDTOPATH=0', 'addtopath=0'); Path = 0; Before = 0 }, + @{ Name = 'default-checked'; Args = @(); Path = 1; Before = 1 }, + @{ Name = 'alias-enable'; Args = @('ADDTOPATH=1'); Path = 1; Before = 1 }, + @{ Name = 'alias-disable'; Args = @('ADDTOPATH=0'); Path = 0; Before = 1 }, + @{ Name = 'case-insensitive'; Args = @('aDdToPaTh=0'); Path = 0; Before = 1 }, + @{ Name = 'same-value-repeated'; Args = @('ADDTOPATH=1', 'addtopath=1'); Path = 1; Before = 1 }, + @{ Name = 'same-zero-repeated'; Args = @('ADDTOPATH=0', 'addtopath=0'); Path = 0; Before = 1 }, @{ Name = 'native-merge-still-works'; Args = @('/MERGETASKS="regularinstall\addtopath"'); Path = 1; Before = 1 }, @{ Name = 'native-tasks-still-works'; Args = @('/TASKS="regularinstall,regularinstall\addtopath"'); Path = 1; Before = 1 }, @{ Name = 'override-tasks-disable'; Args = @('/TASKS="regularinstall,regularinstall\startmenuicon,regularinstall\addtopath"', 'ADDTOPATH=0'); Path = 0; Before = 1 }, @@ -120,11 +120,12 @@ try { @{ Name = 'portable-enable-ignored'; Args = @('/TASKS="portableinstall"', 'ADDTOPATH=1'); Path = 0; Before = 0; Portable = 1 }, @{ Name = 'portable-disable-ignored'; Args = @('/TASKS="portableinstall"', 'ADDTOPATH=0'); Path = 0; Before = 0; Portable = 1 }, @{ Name = 'portable-owned-untouched'; Args = @('/TASKS="portableinstall"', 'ADDTOPATH=1'); Path = 0; Before = 0; Portable = 1; Seed = 'owned' }, - @{ Name = 'unrequested-slash-not-supported'; Args = @('/ADDTOPATH=1'); Path = 0; Before = 0 }, + @{ Name = 'unrequested-slash-not-supported'; Args = @('/ADDTOPATH=0'); Path = 1; Before = 1 }, @{ Name = 'previous-on-retained'; Args = @(); Path = 1; Before = 1; Previous = 'on'; Seed = 'owned' }, + @{ Name = 'previous-off-retained'; Args = @(); Path = 0; Before = 0; Previous = 'off' }, @{ Name = 'previous-on-alias-off'; Args = @('ADDTOPATH=0'); Path = 0; Before = 1; Previous = 'on'; Seed = 'owned' }, @{ Name = 'previous-off-alias-on'; Args = @('ADDTOPATH=1'); Path = 1; Before = 0; Previous = 'off' }, - @{ Name = 'preexisting-enable-unowned'; Args = @('ADDTOPATH=1'); Path = 1; Before = 0; Seed = 'preexisting' }, + @{ Name = 'preexisting-enable-unowned'; Args = @('ADDTOPATH=1'); Path = 1; Before = 1; Seed = 'preexisting' }, @{ Name = 'preexisting-disable-preserved'; Args = @('/MERGETASKS="regularinstall\addtopath"', 'ADDTOPATH=0'); Path = 0; Before = 1; Seed = 'preexisting' }, @{ Name = 'invalid-missing-equals'; Args = @('ADDTOPATH'); Invalid = 'Invalid argument' }, @{ Name = 'invalid-empty'; Args = @('ADDTOPATH='); Invalid = 'Invalid argument' },