Browse files

(docs) update wiki docs

  • Loading branch information...
ferventcoder committed Nov 10, 2017
1 parent 7ad88d4 commit 3cf69c4eb9e7dbd4da71e09be2f4102ae30fea0e
Submodule updated from 224a12 to d6e58f
@@ -98,8 +98,12 @@ Set-ExecutionPolicy Bypass -Scope Process -Force; iwr
<li>You can put the chocolatey.nupkg on an internal package repository and then address that full path, similar to how you see in the Puppet provider - <a href="" class="uri"></a></li>
<li><p>Then you would run a script similar to the below to address that local install. If it is on a repository somewhere, you will need to enhance the below script to get that file (the Chocolatey Puppet provider install script shows that).</p></li>
<pre><code class="powershell"># based on local file, see above instructions for how you can obtain package
# from internal repository and download it local
<pre><code class="powershell"># use an internal repository to download Chocolatey nupkg to the local path:
$packageRepo = &#39;&lt;INSERT REPO URL&gt;&#39;
# uncomment if you want to download the file from a remote OData (HTTP/HTTPS) internal url (such as Artifactory, Nexus, ProGet, or Chocolatey.Server)
#$searchUrl = ($packageRepo.Trim(&#39;/&#39;), &#39;Packages()?$filter=(Id%20eq%20%27chocolatey%27)%20and%20IsLatestVersion&#39;) -join &#39;/&#39;
$localChocolateyPackageFilePath = &#39;c:\packages\chocolatey.0.10.0.nupkg&#39;
$ChocoInstallPath = &quot;$($env:SystemDrive)\ProgramData\Chocolatey\bin&quot;
@@ -110,6 +114,22 @@ $DebugPreference = &quot;Continue&quot;;
# installation, uncomment the next line
#$env:ChocolateyEnvironmentDebug = &#39;true&#39;
function Download-Package {
param (
$downloader = new-object System.Net.WebClient
Write-Output &quot;Querying latest package from $packageODataSearchUrl&quot;
[xml]$pkg = $downloader.DownloadString($packageODataSearchUrl)
$packageDownloadUrl = $pkg.feed.entry.content.src
Write-Output &quot;Downloading $packageDownloadUrl to $file&quot;
$downloader.DownloadFile($packageDownloadUrl, $file)
function Install-LocalChocolateyPackage {
param (
[string]$chocolateyPackageFilePath = &#39;&#39;
@@ -162,6 +182,11 @@ param (
# Idempotence - do not install Chocolatey if it is already installed
if (!(Test-Path $ChocoInstallPath)) {
# download the package to the local path
if ($searchUrl) {
Download-Package $searchUrl $localChocolateyPackageFilePath
# Install Chocolatey
Install-LocalChocolateyPackage $localChocolateyPackageFilePath
Oops, something went wrong.

0 comments on commit 3cf69c4

Please sign in to comment.