Skip to content

Commit

Permalink
(doc) Use full option names
Browse files Browse the repository at this point in the history
Based on feedback from this issue:
chocolatey/choco#2850
  • Loading branch information
gep13 committed Oct 7, 2022
1 parent 2cdf2da commit 7f71312
Show file tree
Hide file tree
Showing 24 changed files with 89 additions and 89 deletions.
10 changes: 5 additions & 5 deletions input/en-us/agent/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ To set Chocolatey in background mode, you need to run the following:
* You also need to opt in sources in for self-service packages. See [choco source](xref:choco-command-source) (and `--allow-self-service`). You can also run `choco source -?` to get the help menu.
* OPTIONAL (not recommended): Alternatively, you can allow any configured source to be used for self-service by running the following: `choco feature disable --name="'useBackgroundServiceWithSelfServiceSourcesOnly'"` (requires Chocolatey Extension v1.10.0+). We do not recommend this as it could be a security finding if you shut it off.
* OPTIONAL (highly recommended): If you want self-service to apply only to non-administrators, run `choco feature enable --name="'useBackgroundServiceWithNonAdministratorsOnly'"` (requires Chocolatey Extension v1.11.1+). Do understand this means that a real non-administrator, not an administrator in a non-elevated UAC context (that scenario will go the normal route and will not go through background mode).
* OPTIONAL (varied recommendations): If you want to configure custom commands (not just install/upgrade), use something like `choco config set backgroundServiceAllowedCommands "install,upgrade,pin,sync"` (with the commands you want to allow, requires Chocolatey Extension v1.12.4+). See [commands consideration](#command-customization-consideration) below.
* OPTIONAL (varied recommendations): If you want to configure custom commands (not just install/upgrade), use something like `choco config set --name backgroundServiceAllowedCommands --value "install,upgrade,pin,sync"` (with the commands you want to allow, requires Chocolatey Extension v1.12.4+). See [commands consideration](#command-customization-consideration) below.
* OPTIONAL (highly recommended): If you want to allow non-admins to uninstall packages, you can also restrict down to only the packages they have installed/upgraded. Run `choco feature enable --name="'allowBackgroundServiceUninstallsFromUserInstallsOnly'"` (requires Chocolatey Extension v2.0+).
* OPTIONAL (highly recommended): For use with Chocolatey GUI, you need Chocolatey Extension v1.12.4+, and at least Chocolatey GUI v0.15.0. **Uninstall any version of the GUI you already have installed first**, then run `choco upgrade chocolateygui -y --allow-downgrade` (you will also need at least .NET 4.5.2 installed)
* DOES NOT WORK WITH UAC, DO NOT USE UNTIL [FIX IS ANNOUNCED](https://groups.google.com/group/chocolatey-announce)! OPTIONAL (recommended if you use installers that are not completely silent): If you want self-service to interactively manage installations, run `choco feature enable --name="'useBackgroundServiceInteractively'"` (requires Chocolatey Extension v1.12.10+). This requires that you use the `ChocolateyLocalAdmin` account with the Chocolatey-managed password as passwords are not stored and the service would need to produce that at runtime. There are some security considerations and why this is not turned on by default. Please see [interactive self-service consideration](#interactive-self-service-consideration).
Expand All @@ -101,7 +101,7 @@ choco feature disable --name="'showNonElevatedWarnings'"
choco feature enable --name="'useBackgroundService'"
choco feature enable --name="'useBackgroundServiceWithNonAdministratorsOnly'"
# allow uninstalls as well:
#choco config set backgroundServiceAllowedCommands "install,upgrade,uninstall"
#choco config set --name backgroundServiceAllowedCommands --value "install,upgrade,uninstall"
# restrict uninstalls to just packages the user has installed/upgraded (requires Chocolatey Extension v2.0+):
#choco feature enable --name="'allowBackgroundServiceUninstallsFromUserInstallsOnly'"
Expand Down Expand Up @@ -358,15 +358,15 @@ You can not pass custom source arguments to Chocolatey, it will error. You need

> :memo: **NOTE**
>
> If you have run `choco feature disable -n useBackgroundServiceWithSelfServiceSourcesOnly`, then all configured sources will be passed by the background service.
> If you have run `choco feature disable --name useBackgroundServiceWithSelfServiceSourcesOnly`, then all configured sources will be passed by the background service.
### I'm getting the following: "There are no sources enabled for packages and none were passed as arguments."

This means you need to opt a source into self-service (new in Chocolatey Extension v1.10).

This just involves ensuring a source is set so that it allows self-service. To do this you run `choco source add -n name -s location <--other details need repeated> --allow-self-service`. Editing a source happens when the name is the same in `choco source add`.
This just involves ensuring a source is set so that it allows self-service. To do this you run `choco source add --name name --source location <--other details need repeated> --allow-self-service`. Editing a source happens when the name is the same in `choco source add`.

To change this behavior back to the way it was previously, simply run `choco disable -n useBackgroundServiceWithSelfServiceSourcesOnly`. For feature options, run `choco feature list` or see [Self-Service Feature Configuration](xref:configuration#self-service-background-mode)
To change this behavior back to the way it was previously, simply run `choco disable --name useBackgroundServiceWithSelfServiceSourcesOnly`. For feature options, run `choco feature list` or see [Self-Service Feature Configuration](xref:configuration#self-service-background-mode)

### I'm having trouble seeing packages on a file share source

Expand Down
2 changes: 1 addition & 1 deletion input/en-us/central-management/setup/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ First you need Chocolatey Agent installed. As there may be some steps involved w
At a minimum you need the following items set to be able to have a Chocolatey Agent be "opted-in" for both checking into Central Management and Deployments:

```powershell
choco config set CentralManagementServiceUrl https://<FQDN_CCM_SERVICE>:24020/ChocolateyManagementService
choco config set --name CentralManagementServiceUrl --value https://<FQDN_CCM_SERVICE>:24020/ChocolateyManagementService
choco feature enable --name="'useChocolateyCentralManagement'"
# Requires Chocolatey Licensed Extension v2.1.0+, Chocolatey-Agent v0.10.0+, and Chocolatey Central Management v0.2.0+:
choco feature enable --name="'useChocolateyCentralManagementDeployments'"
Expand Down
4 changes: 2 additions & 2 deletions input/en-us/central-management/setup/website.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ The CCM Website is built on ASP.Net Core, and as such we need to ensure that it
### Script for some prerequisites

```powershell
choco install IIS-WebServer -s windowsfeatures --no-progress -y
choco install IIS-ApplicationInit -s windowsfeatures --no-progress -y
choco install IIS-WebServer --source windowsfeatures --no-progress -y
choco install IIS-ApplicationInit --source windowsfeatures --no-progress -y
choco install dotnet-aspnetcoremodule-v2 --version 16.0.22108 --no-progress -y
choco install dotnet-6.0-runtime --version 6.0.5 --no-progress -y
choco install dotnet-6.0-aspnetruntime --version 6.0.5 --no-progress -y
Expand Down
4 changes: 2 additions & 2 deletions input/en-us/choco/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ We've got a few possible breaking changes that could affect you, see what we've

This also marks the first release that uses the [Chocolatey Software digital certificate for signing](https://github.com/chocolatey/choco/issues/1214) instead of the RealDimensions Software, LLC certificate.

Another major feature released in preview is [using remembered arguments on upgrade](https://github.com/chocolatey/choco/issues/797). This is in preview in 0.10.4 and will be turned to 'on' automatically in a future release. We are going to be continually making it better and won't turn it on by default until it is ready. If you want to turn it on and start using it, once you have 0.10.4 installed, run `choco feature enable -n useRememberedArgumentsForUpgrades`. You can also do this per command with `--use-remembered-arguments`. You can also turn it off per command with `--ignore-remembered-arguments`. We've also really described a lot of important considerations and thoughts related to using this so there are no surprises. Please do read the issue notes at length if you plan to use this feature to reduce confusion.
Another major feature released in preview is [using remembered arguments on upgrade](https://github.com/chocolatey/choco/issues/797). This is in preview in 0.10.4 and will be turned to 'on' automatically in a future release. We are going to be continually making it better and won't turn it on by default until it is ready. If you want to turn it on and start using it, once you have 0.10.4 installed, run `choco feature enable --name useRememberedArgumentsForUpgrades`. You can also do this per command with `--use-remembered-arguments`. You can also turn it off per command with `--ignore-remembered-arguments`. We've also really described a lot of important considerations and thoughts related to using this so there are no surprises. Please do read the issue notes at length if you plan to use this feature to reduce confusion.

### Breaking Changes

Expand Down Expand Up @@ -873,7 +873,7 @@ You can also disable the feature `allowEmptyChecksumsSecure` to enforce checksum

The "I got 99 problems, but a package manager ain't one" release. With the release of 0.9.10 (or if you prefer 0.9.10.0), we're about to make everything 100% better in your Windows package management world. We've addressed over 100 features and bugs in this release. We looked at how we could improve PowerShell and we've come out with a [competely internal host](https://github.com/chocolatey/choco/issues/8) that can Prompt and Read-Host in a way that times out and selects default values after a period of time. Speaking of PowerShell, how about some tab completion `choco <tab>` to `choco install node<tab>`? How about never having to [close and reopen your shell again](https://github.com/chocolatey/choco/issues/664)?

Alternative sources (`-source webpi`, `-s windowsfeature`, etc) are back! I mean, am I right?! Have you heard of auto uninstaller? If Chocolatey has installed something that works with Programs and Features, Chocolatey knows how to uninstall it without an uninstall script about 90+% of the time. This feature was in beta for the 0.9.9 series, it is on by default in 0.9.10 (unless you disabled it after trying it, you will need to reenable it, see `choco feature` for more details).
Alternative sources (`-source webpi`, `--source windowsfeature`, etc) are back! I mean, am I right?! Have you heard of auto uninstaller? If Chocolatey has installed something that works with Programs and Features, Chocolatey knows how to uninstall it without an uninstall script about 90+% of the time. This feature was in beta for the 0.9.9 series, it is on by default in 0.9.10 (unless you disabled it after trying it, you will need to reenable it, see `choco feature` for more details).

Here's one you probably never knew existed - extensions. Chocolatey has had the ability to extend itself by adding PowerShell modules for years, and most folks either didn't know it existed or have never used them. We've enhanced them a bit in preparation for the licensed version of Chocolatey.

Expand Down
4 changes: 2 additions & 2 deletions input/en-us/choco/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManage

### Completely offline install

With completely offline use of Chocolatey, you want to ensure you remove the default community package source (`choco source list` followed by `choco source remove -n chocolatey`, or however you would do that with a configuration manager [like Puppet](https://forge.puppet.com/puppetlabs/chocolatey#sources-configuration)).
With completely offline use of Chocolatey, you want to ensure you remove the default community package source (`choco source list` followed by `choco source remove --name chocolatey`, or however you would do that with a configuration manager [like Puppet](https://forge.puppet.com/puppetlabs/chocolatey#sources-configuration)).

1. The first step with offline is to obtain a copy of the Chocolatey Nupkg (nupkg files are just fancy zip files). Go to https://community.chocolatey.org/packages/chocolatey and find a version you want.
1. Click on Download to download that version's nupkg file.
Expand Down Expand Up @@ -422,7 +422,7 @@ Here's an example of setting Chocolatey up with Puppet that sets up and configur

* Download the chocolatey.nupkg from the community repository - [download the latest chocolatey nupkg](https://community.chocolatey.org/api/v2/package/chocolatey) or see [Completely offline install](#completely-offline-install) to get an older version.
* Optionally download the chocolatey.server package from the community repository - [download the latest chocolatey.server nupkg](https://community.chocolatey.org/api/v2/package/chocolatey.server).
* Use `choco push` to push those items to your internal package repository (e.g. `choco push chocolatey.0.10.7.nupkg -s http://internal_repo/ -k abc123`)
* Use `choco push` to push those items to your internal package repository (e.g. `choco push chocolatey.0.10.7.nupkg --source http://internal_repo/ --api-key abc123`)
* Determine how to get the bare url to download the Chocolatey.Nupkg directly. You will need that for the internal url for installing Chocolatey offline. For the community repository, it is https://community.chocolatey.org/api/v2/package/chocolatey


Expand Down
6 changes: 3 additions & 3 deletions input/en-us/create/create-packages-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ Here's a TL;DR quick start version of the package creating tutorial. Follow thes
* **Test the package**
* **Testing should probably be done on a Virtual Machine**
* In your package directory, use:
* `choco install package-name -s .` (package-name is the id element in the nuspec)
* `choco install package-name --source .` (package-name is the id element in the nuspec)
* **Push the package** to the Chocolatey community package repository:
* Get a Chocolatey account:
* [Register](https://chocolatey.org/account/register)
* Copy the API key from [your Chocolatey account](https://chocolatey.org/account).
* `choco apikey -k [API_KEY_HERE] -source https://push.chocolatey.org/`
* `choco push package-name.1.1.0.nupkg -s https://push.chocolatey.org/` - nupkg file can be ommitted if it is the only one in the directory.
* `choco apikey --api-key [API_KEY_HERE] -source https://push.chocolatey.org/`
* `choco push package-name.1.1.0.nupkg --source https://push.chocolatey.org/` - nupkg file can be omitted if it is the only one in the directory.

## Common Mistakes

Expand Down
10 changes: 5 additions & 5 deletions input/en-us/create/create-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ Open a command line in the directory where the nuspec is and type [`choco pack`]
To test the package you just built, open a command line shell and navigate to the directory where the `*.nupkg` file is located. Then type:
~~~powershell
choco install packageName -dv -s .
choco install packageName --debug --verbose --source .
~~~~
This will install the package right out of your source. As you find things you may need to fix, using `--force` (`-f`) will remove and reinstall the package from the updated `*.nupkg`. If you are specifically testing `chocolateyBeforeModify.ps1`, you need to be testing upgrade and uninstall scenarios. You need to install a version of the package with this file **first** as before modify is like uninstall, it runs from the installed package, not the package you are installing (like `chocolateyInstall.ps1` does).
Expand All @@ -394,7 +394,7 @@ This will install the package right out of your source. As you find things you m
> :memo: **NOTE**
>
> If you are using a Semver dash in your package version (such as 1.0.0-beta), you will need to use the `-pre` switch or else you will get *Unable to find package* errors from `choco install`. You can also specify `-version 1.0.0-beta` to try to install that exact version.
> If you are using a Semver dash in your package version (such as 1.0.0-beta), you will need to use the `--pre` switch or else you will get *Unable to find package* errors from `choco install`. You can also specify `-version 1.0.0-beta` to try to install that exact version.
`.` points to the current directory. You can specify multiple directories separated by a semicolon;
Expand All @@ -407,7 +407,7 @@ When your `nuspec` specifies dependencies that are not in your source, you shoul
~~~
You'll need to append the API path like so:
`-source "'.;https://community.chocolatey.org/api/v2/'"` (note the double quotes bookending the apostrophes here, use `%cd%` in cmd.exe or `$pwd` in Powershell.exe if `.` doesn't resolve). See [passing options with quotes](xref:choco-commands#how-to-pass-options-switches).
`--source "'.;https://community.chocolatey.org/api/v2/'"` (note the double quotes bookending the apostrophes here, use `%cd%` in cmd.exe or `$pwd` in Powershell.exe if `.` doesn't resolve). See [passing options with quotes](xref:choco-commands#how-to-pass-options-switches).
> :memo: **NOTE**
>
Expand All @@ -417,7 +417,7 @@ You can also use the `-debug` switch on `choco install` to provide more informat
> :memo: **NOTE**
>
> Do not call install with `.nupkg` - pointing to a file explicitly overrides source. You must call your install with the package name, not the nupkg file and location. You've already specified for choco to look in a local source with `-s "'.;https://community.chocolatey.org/api/v2/'"`. Call `choco install dude -s "'.;https://community.chocolatey.org/api/v2/'"`, not `choco install .\dude.nupkg -s "'.;https://community.chocolatey.org/api/v2/'"`.
> Do not call install with `.nupkg` - pointing to a file explicitly overrides source. You must call your install with the package name, not the nupkg file and location. You've already specified for choco to look in a local source with `--source "'.;https://community.chocolatey.org/api/v2/'"`. Call `choco install dude --source "'.;https://community.chocolatey.org/api/v2/'"`, not `choco install .\dude.nupkg --source "'.;https://community.chocolatey.org/api/v2/'"`.
### Alternative testing strategy
You can also type `choco install -fdv path/to/nuspec` and choco will build the nupkg and attempt to install it.
Expand All @@ -428,7 +428,7 @@ You can also type `choco install -fdv path/to/nuspec` and choco will build the n
## Push Your Package
To push your package after you have built and tested it, you type `choco push packageName.nupkg -s sourceLocation` where *packageName.nupkg* is the name of the nupkg that was built with a version number as part of the package name and *sourceLocation* is the location of the source you want to push to (e.g. `-s https://push.chocolatey.org/` for chocolatey's community feed). You must have an API key for https://push.chocolatey.org/ set. Take a look at [choco push](xref:choco-command-push)
To push your package after you have built and tested it, you type `choco push packageName.nupkg --source sourceLocation` where *packageName.nupkg* is the name of the nupkg that was built with a version number as part of the package name and *sourceLocation* is the location of the source you want to push to (e.g. `--source https://push.chocolatey.org/` for chocolatey's community feed). You must have an API key for https://push.chocolatey.org/ set. Take a look at [choco push](xref:choco-command-push)
## Automatic packaging?
Yes - [Automatic Packaging](xref:automatic-packaging)
Expand Down
2 changes: 1 addition & 1 deletion input/en-us/features/install-directory-override.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Override Install Directory - One Switch, All Installers
- Chocolatey for Business (and Pro) can override the installation directory for compatible installer types automatically.
- Save countless hours determining installers, their switches and the correct way to pass those switches.
The image shows installing 1password with Chocolatey for Business. The command passed is `choco install 1password -s . -y --dir c:\1password`, then shows that Chocolatey automatically determines the installer requires `/DIR="c:\1password"` and installs it to the proper location.
The image shows installing 1password with Chocolatey for Business. The command passed is `choco install 1password --source . -y --dir c:\1password`, then shows that Chocolatey automatically determines the installer requires `/DIR="c:\1password"` and installs it to the proper location.
-->

## See It In Action
Expand Down
Loading

0 comments on commit 7f71312

Please sign in to comment.