Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

Boxstarter WinConfig Module

This is not the latest version of Boxstarter WinConfig Module available.

  • 1
  • 2
  • 3

2.5.3 | Updated: 01 Jul 2015

Downloads:

996,756

Downloads of v 2.5.3:

1,346

Software Author(s):

  • Matt Wrock

Boxstarter WinConfig Module 2.5.3

This is not the latest version of Boxstarter WinConfig Module available.

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed


Validation Testing Unknown


Verification Testing Unknown


Scan Testing Successful:

No detections found in any package files

Details
Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install Boxstarter WinConfig Module, run the following command from the command line or from PowerShell:

>

To upgrade Boxstarter WinConfig Module, run the following command from the command line or from PowerShell:

>

To uninstall Boxstarter WinConfig Module, run the following command from the command line or from PowerShell:

>

Deployment Method:

NOTE

This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to https://community.chocolatey.org/api/v2/)


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade boxstarter.winconfig -y --source="'INTERNAL REPO URL'" --version="'2.5.3'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade boxstarter.winconfig -y --source="'INTERNAL REPO URL'" --version="'2.5.3'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Install boxstarter.winconfig
  win_chocolatey:
    name: boxstarter.winconfig
    version: '2.5.3'
    source: INTERNAL REPO URL
    state: present

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.


chocolatey_package 'boxstarter.winconfig' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '2.5.3'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


cChocoPackageInstaller boxstarter.winconfig
{
    Name     = "boxstarter.winconfig"
    Version  = "2.5.3"
    Source   = "INTERNAL REPO URL"
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'boxstarter.winconfig':
  ensure   => '2.5.3',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

Package Approved

This package was approved as a trusted package on 01 Jul 2015.

Description

Functions that Boxstarter uses to customize the windows environment.


tools\Boxstarter.WinConfig\boxstarter.WinConfig.psd1
 
tools\Boxstarter.WinConfig\Boxstarter.WinConfig.psm1
Resolve-Path $PSScriptRoot\*.ps1 | 
    % { . $_.ProviderPath }

Export-ModuleMember Disable-UAC, Enable-UAC, Get-UAC, Disable-InternetExplorerESC, Get-ExplorerOptions, Set-TaskbarSmall, Install-WindowsUpdate, Move-LibraryDirectory, Enable-RemoteDesktop, Set-ExplorerOptions, Get-LibraryNames, Update-ExecutionPolicy, Enable-MicrosoftUpdate, Disable-MicrosoftUpdate, Set-StartScreenOptions, Set-CornerNavigationOptions, Set-WindowsExplorerOptions, Set-TaskbarOptions
tools\Boxstarter.WinConfig\Boxstarter.WinConfig.pssproj
 
tools\Boxstarter.WinConfig\Boxstarter.WinConfig.pssproj.user
 
tools\Boxstarter.WinConfig\Disable-InternetExplorerESC.ps1
function Disable-InternetExplorerESC {
<#
.SYNOPSIS
Turns off IE Enhanced Security Configuration that is on by default on Server OS versions

.LINK
http://boxstarter.org

#>
    $AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
    $UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
    if(Test-Path $AdminKey){
        Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0
        $disabled = $true
    }
    if(Test-Path $UserKey) {
        Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0
        $disabled = $true
    }
    if($disabled) {
        Restart-Explorer
        Write-Output "IE Enhanced Security Configuration (ESC) has been disabled."
    }
}
tools\Boxstarter.WinConfig\Disable-MicrosoftUpdate.ps1
function Disable-MicrosoftUpdate {
<#
.SYNOPSIS
Turns off Microsoft Update, so additional updates for other Microsoft products, installed on the system, will not be included when running Windows Update.

.LINK
http://boxstarter.org
Enable-MicrosoftUpdate

#>
	if(Get-IsMicrosoftUpdateEnabled) {
		Write-BoxstarterMessage "Microsoft Update is currently enabled."
		Write-BoxstarterMessage "Disabling Microsoft Update..."
		# Making modifications to removed an established Service, when being executed from a remote session, needs elevated permissions.
		# As a result, a call to invoke a scheduled task to execute the work will be used, otherwise execute normally.
		if(Get-IsRemote){
			Invoke-FromTask @"
				`$serviceManager = New-Object -ComObject Microsoft.Update.ServiceManager -Strict
				`$serviceManager.ClientApplicationID = "Boxstarter"
				`$serviceManager.RemoveService("7971f918-a847-4430-9279-4a52d1efe18d")
"@
		}
		else{
			$serviceManager = New-Object -ComObject Microsoft.Update.ServiceManager -Strict
			$serviceManager.ClientApplicationID = "Boxstarter"
			$serviceManager.RemoveService("7971f918-a847-4430-9279-4a52d1efe18d")
	   }
	}
	else {
		Write-BoxstarterMessage "Microsoft Update is already disabled, no action will be taken."
	}
}
tools\Boxstarter.WinConfig\Disable-UAC.ps1
function Disable-UAC {
<#
.SYNOPSIS
Turns off Windows User Access Control

.LINK
http://boxstarter.org
Enable-UAC

#>
    Write-BoxstarterMessage "Disabling UAC"
    Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA  -Value 0
}
tools\Boxstarter.WinConfig\Enable-MicrosoftUpdate.ps1
function Enable-MicrosoftUpdate {
<#
.SYNOPSIS
Turns on Microsoft Update, so additional updates for other Microsoft products, installed on the system, will be included when running Windows Update.

.LINK
http://boxstarter.org
Disable-MicrsoftUpdate

#>   
	if(!(Get-IsMicrosoftUpdateEnabled)) {
		Write-BoxstarterMessage "Microsoft Update is currently disabled."
		Write-BoxstarterMessage "Enabling Microsoft Update..."
		
		$serviceManager = New-Object -ComObject Microsoft.Update.ServiceManager -Strict
		$serviceManager.ClientApplicationID = "Boxstarter"
		$serviceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")
	}
	else {
		Write-BoxstarterMessage "Microsoft Update is already enabled, no action will be taken."
	}
}
tools\Boxstarter.WinConfig\Enable-RemoteDesktop.ps1
function Enable-RemoteDesktop {
<#
.SYNOPSIS
Allows Remote Desktop access to machine and enables Remote Desktop firewall rule

.LINK
http://boxstarter.org

#>
    Write-BoxstarterMessage "Enabling Remote Desktop..."
    $obj = Get-WmiObject -Class "Win32_TerminalServiceSetting" -Namespace root\cimv2\terminalservices
    if($obj -eq $null) {
        Write-BoxstarterMessage "Unable to locate terminalservices namespace. Remote Desktop is not enabled"
        return
    }
    $obj.SetAllowTsConnections(1,1) | out-null
}
tools\Boxstarter.WinConfig\Enable-UAC.ps1
function Enable-UAC {
<#
.SYNOPSIS
Turns on Windows User Access Control

.LINK
http://boxstarter.org

#>
    Write-BoxstarterMessage "Enabling UAC"
    Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA  -Value 1
}
tools\Boxstarter.WinConfig\Get-LibraryNames.ps1
function Get-LibraryNames {
<#
.SYNOPSIS
Lists all Windows Library folders (My Pictures, personal, downloads, etc)

.DESCRIPTION
Libraries are special folders that map to a specific location on disk. These are usually found somewhere under $env:userprofile. This function can be used to discover the existing libraries and then use Move-LibraryDirectory to move the path of a library if desired.

.LINK
http://boxstarter.org
Move-LibraryDirectory

#>
    $shells = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
    $retVal = @()
    (Get-Item $shells).Property | % {
        $property = ( Get-ItemProperty -Path $shells -Name $_ )
        $retVal += @{ "$_"=$property."$_" }
    }
    return $retVal
}
tools\Boxstarter.WinConfig\Get-UAC.ps1
<#A Build step copies this function to bootstrapper Directory. Only edit script in Helpers#>
function Get-UAC {
<#
.SYNOPSIS
Checks if User Access Control is turned on

.LINK
http://boxstarter.org

#>
    $uac=Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA
    return $uac.EnableLUA -eq 1
}
tools\Boxstarter.WinConfig\Install-WindowsUpdate.ps1
function Install-WindowsUpdate {
<#
.SYNOPSIS
Downloads and installs updates via Windows Update

.DESCRIPTION
This uses the windows update service to search, download and install updates. By default, only critical updates are included and a reboot will be induced if required.

.PARAMETER GetUpdatesFromMS
If this switch is set, the default windows update server, if any, is bypassed and windows update requests go to the public Microsoft Windows update service.

.PARAMETER AcceptEula
If any update requires a Eula acceptance, setting this switch will accept the Eula and allow the update to be installed.

.PARAMETER SuppressReboots
Setting this switch will suppress a reboot in the event that any update requires one.

.PARAMETER Criteria
The criteria used for searching updates. The default criteria is "IsHidden=0 and IsInstalled=0 and Type='Software'" which is effectively just critical updates.

.LINK
http://boxstarter.org

#>    
    param(
        [switch]$getUpdatesFromMS, 
        [switch]$acceptEula, 
        [switch]$SuppressReboots,
        [string]$criteria="IsHidden=0 and IsInstalled=0 and Type='Software' and BrowseOnly=0"
    )

    if(Get-IsRemote){
        Invoke-FromTask @"
Import-Module $($boxstarter.BaseDir)\boxstarter.WinConfig\Boxstarter.Winconfig.psd1
Install-WindowsUpdate -GetUpdatesFromMS:`$$GetUpdatesFromMS -AcceptEula:`$$AcceptEula -SuppressReboots -Criteria "$Criteria"
"@ -IdleTimeout 0 -TotalTimeout 0
        if(Test-PendingReboot){
            Invoke-Reboot
        }
        return
    }

    try{
        $searchSession=Start-TimedSection "Checking for updates..."        
        $updateSession =new-object -comobject "Microsoft.Update.Session"
        $Downloader =$updateSession.CreateUpdateDownloader()
        $Installer =$updateSession.CreateUpdateInstaller()
        $Searcher =$updatesession.CreateUpdateSearcher()
        if($getUpdatesFromMS) {
            $Searcher.ServerSelection = 2 #2 is the Const for the Windows Update server
        }
        $wus=Get-WmiObject -Class Win32_Service -Filter "Name='wuauserv'"
        $origStatus=$wus.State
        $origStartupType=$wus.StartMode
        Write-BoxstarterMessage "Update service is in the $origStatus state and its startup type is $origStartupType" -verbose
        if($origStartupType -eq "Auto"){
            $origStartupType = "Automatic"
        }
        if($origStatus -eq "Stopped"){
            if($origStartupType -eq "Disabled"){
                Set-Service wuauserv -StartupType Automatic
            }
            Out-BoxstarterLog "Starting windows update service" -verbose
            Start-Service -Name wuauserv
        }
        else {
            # Restart in case updates are running in the background
            Out-BoxstarterLog "Restarting windows update service" -verbose
            Remove-BoxstarterError { Restart-Service -Name wuauserv -Force -WarningAction SilentlyContinue }
        }

        $Result = $Searcher.Search($criteria)
        Stop-TimedSection $searchSession
        $totalUpdates = $Result.updates.count

        If ($totalUpdates -ne 0)
        {
            Out-BoxstarterLog "$($Result.updates.count) Updates found"
            $currentCount = 0
            foreach($update in $result.updates) {
                ++$currentCount
                if(!($update.EulaAccepted)){
                    if($acceptEula) {
                        $update.AcceptEula()
                    }
                    else {
                        Out-BoxstarterLog " * $($update.title) has a user agreement that must be accepted. Call Install-WindowsUpdate with the -AcceptEula parameter to accept all user agreements. This update will be ignored."
                        continue
                    }
                }

                $Result= $null
                if ($update.isDownloaded -eq "true" -and ($update.InstallationBehavior.CanRequestUserInput -eq $false )) {
                    Out-BoxstarterLog " * $($update.title) already downloaded"
                    $result = install-Update $update $currentCount $totalUpdates
                }
                elseif($update.InstallationBehavior.CanRequestUserInput -eq $true) {
                    Out-BoxstarterLog " * $($update.title) Requires user input and will not be downloaded"
                }
                else {
                    Download-Update $update
                    $result = Install-Update $update $currentCount $totalUpdates
                }
            }

            if($result -ne $null -and $result.rebootRequired) {
                if($SuppressReboots) {
                    Out-BoxstarterLog "A Restart is Required."
                } else {
                    $Rebooting=$true
                    Out-BoxstarterLog "Restart Required. Restarting now..."
                    Stop-TimedSection $installSession
                    if(test-path function:\Invoke-Reboot) {
                        return Invoke-Reboot
                    } else {
                        Restart-Computer -force
                    }
                }
            }
        }
        else{Out-BoxstarterLog "There is no update applicable to this machine"}    
    }
    catch {
        Out-BoxstarterLog "There were problems installing updates: $($_.ToString())"
        throw
    }
    finally {
        if($origAUVal){
            Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\AU -Name UseWuServer -Value $origAUVal -ErrorAction SilentlyContinue
        }
        if($origStatus -eq "Stopped")
        {
            Out-BoxstarterLog "Stopping win update service and setting its startup type to $origStartupType" -verbose
            Set-Service wuauserv -StartupType $origStartupType
            Remove-BoxstarterError { stop-service wuauserv -WarningAction SilentlyContinue }
        }
    }
}

function Download-Update($update) {
    $downloadSession=Start-TimedSection "Download of $($update.Title)"
    $updates= new-Object -com "Microsoft.Update.UpdateColl"
    $updates.Add($update) | out-null
    $Downloader.Updates = $updates
    $Downloader.Download() | Out-Null
    Stop-TimedSection $downloadSession
}

function Install-Update($update, $currentCount, $totalUpdates) {
    $installSession=Start-TimedSection "Install $currentCount of $totalUpdates updates: $($update.Title)"
    $updates= new-Object -com "Microsoft.Update.UpdateColl"
    $updates.Add($update) | out-null
    $Installer.updates = $Updates
    try { $result = $Installer.Install() } catch {
        if(!($SuppressReboots) -and (test-path function:\Invoke-Reboot)){
            if(Test-PendingReboot){
                $global:error.RemoveAt(0)            
                Invoke-Reboot
            }
        }
        # Check for WU_E_INSTALL_NOT_ALLOWED  
        if($_.Exception.HResult -eq -2146233087) {
            Out-BoxstarterLog "There is either an update in progress or there is a pending reboot blocking the install."
            $global:error.RemoveAt(0)
        }
        else { throw }
    }
    Stop-TimedSection $installSession
    return $result
}
tools\Boxstarter.WinConfig\Move-LibraryDirectory.ps1
function Move-LibraryDirectory {
<#
.SYNOPSIS
Moves a Windows Library folder (My Pictures, personal, downloads, etc) to the given path

.DESCRIPTION
Libraries are special folders that map to a specific location on disk. These are usually found somewhere under $env:userprofile. This function can be used to redirect the library folder to a new location on disk. If the new location does not already exist, the directory will be created. Any content in the former library directory will be moved to the new location unless the DoNotMoveOldContent switch is used. Use Get-LibraryNames to discover the names of different libraries and their current physical directories.

.PARAMETER libraryName
The name of the library to move

.PARAMETER newPath
The path to move the library to. If the path does not exist, it will be created.

.PARAMETER DoNotMoveOldContent
If this switch is used, any content in the current physical directory that the library points to will not be moved to the new path.

.EXAMPLE
Move-LibraryDirectory "Personal" "$env:UserProfile\skydrive\documents"

This moves the Personal library (aka Documents) to the documents folder off of the default skydrive directory.

.LINK
http://boxstarter.org
Get-LibraryNames

#>    
    param(
        [Parameter(Mandatory=$true)]
        [string]$libraryName, 
        [Parameter(Mandatory=$true)]
        [string]$newPath,
        [switch]$DoNotMoveOldContent
    )
    #why name the key downloads when you can name it {374DE290-123F-4565-9164-39C4925E467B}? duh.
    if($libraryName.ToLower() -eq "downloads") {$libraryName="{374DE290-123F-4565-9164-39C4925E467B}"}
    $shells = (Get-Item 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders')
    if(-not ($shells.Property -Contains $libraryName)) {
        throw "$libraryName is not a valid Library"
    }
    $oldPath =  (Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' -name "$libraryName")."$libraryName"
    if(-not (test-path "$newPath")){
        New-Item $newPath -type directory
    }
    if((resolve-path $oldPath).Path -eq (resolve-path $newPath).Path) {return}
    Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' $libraryName $newPath
    Set-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' $libraryName $newPath
    Restart-Explorer
    if(!$DoNotMoveOldContent) { Move-Item -Force $oldPath/* $newPath }
}
tools\Boxstarter.WinConfig\Restart-Explorer.ps1
function Restart-Explorer {

    try{
        Write-BoxstarterMessage "Restarting the Windows Explorer process..."
        $user = Get-CurrentUser
        try { $explorer = Get-Process -Name explorer -ErrorAction stop -IncludeUserName } 
        catch {$global:error.RemoveAt(0)}
        
        if($explorer -ne $null) { 
            $explorer | ? { $_.UserName -eq "$($user.Domain)\$($user.Name)"} | Stop-Process -Force -ErrorAction Stop | Out-Null
        }

        Start-Sleep 1

        if(!(Get-Process -Name explorer -ErrorAction SilentlyContinue)) {
            $global:error.RemoveAt(0)
            start-Process -FilePath explorer
        }
    } catch {$global:error.RemoveAt(0)}
}
tools\Boxstarter.WinConfig\Set-CornerNavigationOptions.ps1
function Set-CornerNavigationOptions {
<#
.SYNOPSIS
Sets options for the Windows Corner Navigation

.PARAMETER EnableUpperRightCornerShowCharms
When I point to the upper-right corner, show the charms

.PARAMETER DisableUpperRightCornerShowCharms
Disables the showing of charms when pointing to the upper right corner, see EnableUpperRightCornerShowCharms

.PARAMETER EnableUpperLeftCornerSwitchApps
When I click the upper-left corner, switch between my recent apps

.PARAMETER DisableUpperLeftCornerSwitchApps
Disables the switching between recent apps, when clicking in the upper-left corner, see EnableUpperLeftCornerSwitchApps

.PARAMETER EnableUsePowerShellOnWinX
Replace Command Prompt with Windows PowerShell in the menu when I right-click the lower-left corner or press Windows key+X

.PARAMETER DisableUsePowerShellOnWinX
Disables the showing of Windows PowerShell in the lower-left corner, see EnableUsePowerShellOnWinX
#>
	[CmdletBinding()]
	param(
		[switch]$EnableUpperRightCornerShowCharms,
		[switch]$DisableUpperRightCornerShowCharms,
		[switch]$EnableUpperLeftCornerSwitchApps,
		[switch]$DisableUpperLeftCornerSwitchApps,
		[switch]$EnableUsePowerShellOnWinX,
		[switch]$DisableUsePowerShellOnWinX
	)

	$PSBoundParameters.Keys | % {
        if($_-like "En*"){ $other="Dis" + $_.Substring(2)}
        if($_-like "Dis*"){ $other="En" + $_.Substring(3)}
        if($PSBoundParameters[$_] -and $PSBoundParameters[$other]) {
            throw new-Object -TypeName ArgumentException "You may not set both $_ and $other. You can only set one."
        }
    }

	$edgeUIKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\EdgeUi'
	$advancedKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'

	if(Test-Path -Path $edgeUIKey) {
		if($EnableUpperRightCornerShowCharms) { Set-ItemProperty -Path $edgeUIKey -Name 'DisableTRCorner' -Value 0 }
		if($DisableUpperRightCornerShowCharms) { Set-ItemProperty -Path $edgeUIKey -Name 'DisableTRCorner' -Value 1 }

		if($EnableUpperLeftCornerSwitchApps) { Set-ItemProperty -Path $edgeUIKey -Name 'DisableTLCorner' -Value 0 }
		if($DisableUpperLeftCornerSwitchApps) { Set-ItemProperty -Path $edgeUIKey -Name 'DisableTLCorner' -Value 1 }
	}

	if(Test-Path -Path $advancedKey) {
		if($EnableUsePowerShellOnWinX) { Set-ItemProperty -Path $advancedKey -Name 'DontUsePowerShellOnWinX' -Value 0 }
		if($DisableUsePowerShellOnWinX) { Set-ItemProperty -Path $advancedKey -Name 'DontUsePowerShellOnWinX' -Value 1 }
    }
}
tools\Boxstarter.WinConfig\Set-ExplorerOptions.ps1
function Set-ExplorerOptions {
<#
.SYNOPSIS
Sets options on the windows Explorer shell

.PARAMETER showHidenFilesFoldersDrives
If this switch is set, hidden files will be shown in windows explorer

.PARAMETER showProtectedOSFiles
If this flag is set, hidden Operating System files will be shown in windows explorer

.PARAMETER showFileExtensions
Setting this switch will cause windows explorer to include the file extension in file names

.LINK
http://boxstarter.org

#>    
    param(
        [switch]$showHidenFilesFoldersDrives, 
        [switch]$showProtectedOSFiles, 
        [switch]$showFileExtensions
    )

	Write-Warning "This command is deprecated, use Set-WindowsExplorerOptions instead."
	Write-Warning "Your call to this function will now be routed to the Set-WindowsExplorerOptions function."

	if($showHidenFilesFoldersDrives) { Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives }
    if($showFileExtensions) { Set-WindowsExplorerOptions -EnableShowProtectedOSFiles }
    if($showProtectedOSFiles) { Set-WindowsExplorerOptions -EnableShowFileExtensions }
}
tools\Boxstarter.WinConfig\Set-StartScreenOptions.ps1
function Set-StartScreenOptions {
<#
.SYNOPSIS
Sets options for the Windows Start Screen.

.PARAMETER EnableBootToDesktop
When I sign in or close all apps on a screen, go to the desktop instead of Start

.PARAMETER DisableBootToDesktop
Disables the Boot to Desktop Option, see enableBootToDesktop

.PARAMETER EnableDesktopBackgroundOnStart
Show Desktop background on Start

.PARAMETER DisableDesktopBackgroundOnStart
Do not show Desktop background on Start

.PARAMETER EnableShowStartOnActiveScreen
Show Start on the display I'm using when I press the Windows logo key

.PARAMETER DisableShowStartOnActiveScreen
Disables the displaying of the Start screen on active screen, see enableShowStartOnActiveScreen

.PARAMETER EnableShowAppsViewOnStartScreen
Show the Apps view automatically when I go to Start

PARAMETER DisableShowAppsViewOnStartScreen
Disables the showing of Apps View when Start is activated, see enableShowAppsViewOnStartScreen

.PARAMETER EnableSearchEverywhereInAppsView
Search everywhere instead of just my apps when I search from the Apps View

.PARAMETER DisableSearchEverywhereInAppsView
Disables the searching of everywhere instead of just apps, see enableSearchEverywhereInAppsView

.PARAMETER EnableListDesktopAppsFirst
List desktop apps first in the Apps view when it's sorted by category

.PARAMETER DisableListDesktopAppsFirst
Disables the ability to list desktop apps first when sorted by category, see enableListDesktopAppsFirst

.LINK
http://boxstarter.org

#>    
    [CmdletBinding()]
	param(
		[switch]$EnableBootToDesktop,
		[switch]$DisableBootToDesktop,
		[switch]$EnableDesktopBackgroundOnStart,
		[switch]$DisableDesktopBackgroundOnStart,
		[switch]$EnableShowStartOnActiveScreen,
		[switch]$DisableShowStartOnActiveScreen,
		[switch]$EnableShowAppsViewOnStartScreen,
		[switch]$DisableShowAppsViewOnStartScreen,
		[switch]$EnableSearchEverywhereInAppsView,
		[switch]$DisableSearchEverywhereInAppsView,
		[switch]$EnableListDesktopAppsFirst,
		[switch]$DisableListDesktopAppsFirst
	)

    $PSBoundParameters.Keys | %{
        if($_-like "En*"){ $other="Dis" + $_.Substring(2)}
        if($_-like "Dis*"){ $other="En" + $_.Substring(3)}
        if($PSBoundParameters[$_] -and $PSBoundParameters[$other]){
            throw new-Object -TypeName ArgumentException "You may not set both $_ and $other. You can only set one."
        }
    }

	$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer'
    $startPageKey = "$key\StartPage"
    $accentKey = "$key\Accent"

	if(Test-Path -Path $startPageKey) {
		if($enableBootToDesktop) { Set-ItemProperty -Path $startPageKey -Name 'OpenAtLogon' -Value 0 }
		if($disableBootToDesktop) { Set-ItemProperty -Path $startPageKey -Name 'OpenAtLogon' -Value 1 }

		if($enableShowStartOnActiveScreen) { Set-ItemProperty -Path $startPageKey -Name 'MonitorOverride' -Value 1 }
		if($disableShowStartOnActiveScreen) { Set-ItemProperty -Path $startPageKey -Name 'MonitorOverride' -Value 0 }

		if($enableShowAppsViewOnStartScreen) { Set-ItemProperty -Path $startPageKey -Name 'MakeAllAppsDefault' -Value 1 }
		if($disableShowAppsViewOnStartScreen) { Set-ItemProperty -Path $startPageKey -Name 'MakeAllAppsDefault' -Value 0 }

		if($enableSearchEverywhereInAppsView) { Set-ItemProperty -Path $startPageKey -Name 'GlobalSearchInApps' -Value 1 }
		if($disableSearchEverywhereInAppsView) { Set-ItemProperty -Path $startPageKey -Name 'GlobalSearchInApps' -Value 0 }

		if($enableListDesktopAppsFirst) { Set-ItemProperty -Path $startPageKey -Name 'DesktopFirst' -Value 1 }
		if($disableListDesktopAppsFirst) { Set-ItemProperty -Path $startPageKey -Name 'DesktopFirst' -Value 0 }
	}

	if(Test-Path -Path $accentKey) {
		if($EnableDesktopBackgroundOnStart) { Set-ItemProperty -Path $accentKey -Name 'MotionAccentId_v1.00' -Value 219 }
		if($DisableDesktopBackgroundOnStart) { Set-ItemProperty -Path $accentKey -Name 'MotionAccentId_v1.00' -Value 221 }
    }
}
tools\Boxstarter.WinConfig\Set-TaskbarOptions.ps1
function Set-TaskbarOptions {
<#
.SYNOPSIS
Sets options for the Windows Task Bar

.PARAMETER Lock
Locks the taskbar

.PARAMETER UnLock
Unlocks the taskbar

.PARAMETER Size
Changes the size of the Taskbar Icons.  Valid inputs are Small and Large.

.PARAMETER Dock
Changes the location in which the Taskbar is docked.  Valid inputs are Top, Left, Bottom and Right.

#>
	[CmdletBinding(DefaultParameterSetName='unlock')]
	param(
        [Parameter(ParameterSetName='lock')]
        [switch]$Lock,
        [Parameter(ParameterSetName='unlock')]
        [switch]$UnLock,
		[ValidateSet('Small','Large')]
		$Size,
		[ValidateSet('Top','Left','Bottom','Right')]
		$Dock
	)

	$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
	$dockingKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2'

	if(Test-Path -Path $key) {
		if($Lock) 
		{ 
			Set-ItemProperty $key TaskbarSizeMove 0
        }
        if($UnLock){
			Set-ItemProperty $key TaskbarSizeMove 1 
		} 

		switch ($Size) {
			"Small" { Set-ItemProperty $key TaskbarSmallIcons 1 }
			"Large" { Set-ItemProperty $key TaskbarSmallIcons 0 }
		}

		Restart-Explorer
	}	

	if(Test-Path -Path $dockingKey) {
		switch ($Dock) {
			"Top" { Set-ItemProperty -Path $dockingKey -Name Settings -Value ([byte[]] (0x28,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0x2e,0x00,0x00,0x00)) }
			"Left" { Set-ItemProperty -Path $dockingKey -Name Settings -Value ([byte[]] (0x28,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0xb0,0x04,0x00,0x00)) }
			"Bottom" { Set-ItemProperty -Path $dockingKey -Name Settings -Value ([byte[]] (0x28,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x04,0x00,0x00,0x80,0x07,0x00,0x00,0xb0,0x04,0x00,0x00)) }
			"Right" { Set-ItemProperty -Path $dockingKey -Name Settings -Value ([byte[]] (0x28,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,0x42,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x00,0x00,0xb0,0x04,0x00,0x00)) }
		}

		Restart-Explorer
	}
}
tools\Boxstarter.WinConfig\Set-TaskbarSmall.ps1
function Set-TaskbarSmall {
<#
.SYNOPSIS
Makes the windows task bar skinny
#>
	Write-Warning "This command is deprecated, use Set-TaskbarOptions instead."
	Write-Warning "Your call to this function will now be routed to the Set-TaskbarOptions function."

    Set-TaskbarOptions -Size Small
}
tools\Boxstarter.WinConfig\Set-WindowsExplorerOptions.ps1
function Set-WindowsExplorerOptions {
<#
.SYNOPSIS
Sets options on the Windows Explorer shell

.PARAMETER EnableShowHiddenFilesFoldersDrives
If this flag is set, hidden files will be shown in Windows Explorer

.PARAMETER DisableShowHiddenFilesFoldersDrives
Disables the showing on hidden files in Windows Explorer, see EnableShowHiddenFilesFoldersDrives

.PARAMETER EnableShowProtectedOSFiles
If this flag is set, hidden Operating System files will be shown in Windows Explorer

.PARAMETER DisableShowProtectedOSFiles
Disables the showing of hidden Operating System Files in Windows Explorer, see EnableShowProtectedOSFiles

.PARAMETER EnableShowFileExtensions
Setting this switch will cause Windows Explorer to include the file extension in file names

.PARAMETER DisableShowFileExtensions
Disables the showing of file extension in file names, see EnableShowFileExtensions

.PARAMETER EnableShowFullPathInTitleBar
Setting this switch will cause Windows Explorer to show the full folder path in the Title Bar

.PARAMETER DisableShowFullPathInTitleBar
Disables the showing of the full path in Windows Explorer Title Bar, see EnableShowFullPathInTitleBar

.LINK
http://boxstarter.org

#>   

	[CmdletBinding()]
	param(
		[switch]$EnableShowHiddenFilesFoldersDrives,
		[switch]$DisableShowHiddenFilesFoldersDrives,
		[switch]$EnableShowProtectedOSFiles,
		[switch]$DisableShowProtectedOSFiles,
		[switch]$EnableShowFileExtensions,
		[switch]$DisableShowFileExtensions,
		[switch]$EnableShowFullPathInTitleBar,
		[switch]$DisableShowFullPathInTitleBar
	)

	$PSBoundParameters.Keys | % {
        if($_-like "En*"){ $other="Dis" + $_.Substring(2)}
        if($_-like "Dis*"){ $other="En" + $_.Substring(3)}
        if($PSBoundParameters[$_] -and $PSBoundParameters[$other]) {
            throw new-Object -TypeName ArgumentException "You may not set both $_ and $other. You can only set one."
        }
    }

	$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer'
    $advancedKey = "$key\Advanced"
	$cabinetStateKey = "$key\CabinetState"

    Write-BoxstarterMessage "Setting Windows Explorer options..."

	if(Test-Path -Path $advancedKey) {
		if($EnableShowHiddenFilesFoldersDrives) {Set-ItemProperty $advancedKey Hidden 1}
		if($DisableShowHiddenFilesFoldersDrives) {Set-ItemProperty $advancedKey Hidden 0}
		
		if($EnableShowFileExtensions) {Set-ItemProperty $advancedKey HideFileExt 0}
		if($DisableShowFileExtensions) {Set-ItemProperty $advancedKey HideFileExt 1}
		
		if($EnableShowProtectedOSFiles) {Set-ItemProperty $advancedKey ShowSuperHidden 1}
		if($DisableShowProtectedOSFiles) {Set-ItemProperty $advancedKey ShowSuperHidden 0}
		
		Restart-Explorer
	}

	if(Test-Path -Path $cabinetStateKey) {
		if($EnableShowFullPathInTitleBar) {Set-ItemProperty $cabinetStateKey FullPath  1}
		if($DisableShowFullPathInTitleBar) {Set-ItemProperty $cabinetStateKey FullPath  0}
		
		Restart-Explorer		
	}
}
tools\Boxstarter.WinConfig\Update-ExecutionPolicy.ps1
function Update-ExecutionPolicy {
<#
.SYNOPSIS
Sets the execution policy for the current account

.DESCRIPTION
The execution policy is set in a separate elevated 
PowerShell process. If running in the chocolatey runner, 
the current window cannot be used because its execution 
policy has been explicitly set.

If on a 64 bit machine, the policy will be set for both 
64 and 32 bit shells.

.PARAMETER Policy
The execution policy to set

#>    
    param(
        [ValidateSet('Unrestricted','RemoteSigned','AllSigned','Restricted','Default','Bypass','Undefined')]
        [string]$policy
    )
    write-BoxstarterMessage "Setting PowerShell execution context to $policy"
    if(Is64Bit) {
        Start-Process "$env:SystemRoot\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" -verb runas -wait -argumentList "-noprofile -WindowStyle hidden -noninteractive -ExecutionPolicy unrestricted -Command `"Set-ExecutionPolicy $policy`""
    }
    Start-Process "powershell.exe" -verb runas -wait -argumentList "-noprofile -noninteractive -ExecutionPolicy unrestricted -WindowStyle hidden -Command `"Set-ExecutionPolicy $policy`""
}

function Is64Bit {  [IntPtr]::Size -eq 8  }
tools\chocolateyinstall.ps1
$tools = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
. (Join-Path $tools Setup.ps1)
try { 
    $ModuleName = (Get-ChildItem $tools | ?{ $_.PSIsContainer }).BaseName
    Install-Boxstarter "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $ModuleName $env:chocolateyPackageParameters
} catch {
    write-output $_ | fl * -force
    throw $_.Exception
}
tools\LICENSE.txt
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.
tools\setup.ps1
function Install-Boxstarter($here, $ModuleName, $installArgs = "") {
    $boxstarterPath=Join-Path $env:AppData Boxstarter
    if(!(test-Path $boxstarterPath)){
        mkdir $boxstarterPath
    }
    $packagePath=Join-Path $boxstarterPath BuildPackages
    if(!(test-Path $packagePath)){
        mkdir $packagePath
    }    
    foreach($ModulePath in (Get-ChildItem $here | ?{ $_.PSIsContainer })){
        $target=Join-Path $boxstarterPath $modulePath.BaseName
        if(test-Path $target){
            Remove-Item $target -Recurse -Force
        }
    }
    Copy-Item "$here\*" $boxstarterPath -Recurse -Force -Exclude ChocolateyInstall.ps1, Setup.*

    PersistBoxStarterPathToEnvironmentVariable "PSModulePath"
    PersistBoxStarterPathToEnvironmentVariable "Path"
    $binPath =  "$here\..\..\..\bin"
    $boxModule=Get-Module Boxstarter.Chocolatey
    if($boxModule) {
        if($boxModule.Path -like "$env:LOCALAPPDATA\Apps\*") {
            $clickonce=$true
        }
    }
    if(!$clickonce){
        Import-Module "$boxstarterPath\$ModuleName" -DisableNameChecking -Force -ErrorAction SilentlyContinue
    }
    $successMsg = @"
The $ModuleName Module has been copied to $boxstarterPath and added to your Module path. 
You will need to open a new console for the path to be visible.
Use 'Get-Module Boxstarter.* -ListAvailable' to list all Boxstarter Modules.
To list all available Boxstarter Commands, use:
PS:>Import-Module $ModuleName
PS:>Get-Command -Module Boxstarter.*

To find more info visit http://Boxstarter.org or use:
PS:>Import-Module $ModuleName
PS:>Get-Help Boxstarter
"@
    Write-Host $successMsg

    if($ModuleName -eq "Boxstarter.Chocolatey" -and !$env:appdata.StartsWith($env:windir)) {
        $desktop = $([System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::DesktopDirectory))
        $startMenu=$("$env:appdata\Microsoft\Windows\Start Menu\Programs\Boxstarter")
        if(!(Test-Path $startMenu)){
            mkdir $startMenu
        }
        $target="powershell.exe"
        $targetArgs="-ExecutionPolicy bypass -NoExit -Command `"&'$boxstarterPath\BoxstarterShell.ps1'`""

		if($installArgs -inotcontains "nodesktopicon") {
			$link = Join-Path $desktop "Boxstarter Shell.lnk"
			Create-Shortcut $link $target $targetArgs $boxstarterPath
		}
        $link = Join-Path $startMenu "Boxstarter Shell.lnk"
        Create-Shortcut $link $target $targetArgs $boxstarterPath

        Set-Content -Path "$binPath\BoxstarterShell.bat" -Force -Value "$target $TargetArgs"
    }
}

function Create-Shortcut($location, $target, $targetArgs, $boxstarterPath) {
    $wshshell = New-Object -ComObject WScript.Shell
    $lnk = $wshshell.CreateShortcut($location)
    $lnk.TargetPath = $target
    $lnk.Arguments = "$targetArgs"
    $lnk.WorkingDirectory = $boxstarterPath
    $lnk.IconLocation="$boxstarterPath\BoxLogo.ico"
    $lnk.Save()

	$tempFile = "$env:temp\TempShortcut.lnk"
		
	$writer = new-object System.IO.FileStream $tempFile, ([System.IO.FileMode]::Create)
	$reader = new-object System.IO.FileStream $location, ([System.IO.FileMode]::Open)
		
	while ($reader.Position -lt $reader.Length)
	{		
		$byte = $reader.ReadByte()
		if ($reader.Position -eq 22) {
			$byte = 34
		}
		$writer.WriteByte($byte)
	}
		
	$reader.Close()
	$writer.Close()
				
	Move-Item -Path $tempFile $location -Force
}
function PersistBoxStarterPathToEnvironmentVariable($variableName){
    $value = [Environment]::GetEnvironmentVariable($variableName, 'User')
    if($value){
        $values=($value -split ';' | ?{ !($_.ToLower() -match "\\boxstarter$")}) -join ';'
        $values+=";$boxstarterPath"
    } 
    elseif($variableName -eq "PSModulePath") {
        $values=[environment]::getfolderpath("mydocuments")
        $values +="\WindowsPowerShell\Modules;$boxstarterPath"
    }
    else {
        $values ="$boxstarterPath"
    }
    if(!$value -or !($values -contains $boxstarterPath)){
        $values = $values.Replace(';;',';')
        [Environment]::SetEnvironmentVariable($variableName, $values, 'User')
        $varValue = Get-Content env:\$variableName
        $varValue += ";$boxstarterPath"
        $varValue = $varValue.Replace(';;',';')
        Set-Content env:\$variableName -value $varValue
    }
}

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
Boxstarter WinConfig Module 3.0.2 34753 Monday, June 12, 2023 Approved
Boxstarter WinConfig Module 3.0.1 4078 Tuesday, June 6, 2023 Approved
Boxstarter WinConfig Module 3.0.0 91692 Thursday, July 14, 2022 Approved
Boxstarter WinConfig Module 3.0.0-beta-20220427-21 110 Wednesday, April 27, 2022 Exempted
Boxstarter WinConfig Module 2.13.0 153749 Thursday, October 15, 2020 Approved
Boxstarter WinConfig Module 2.12.0 392367 Tuesday, October 30, 2018 Approved
Boxstarter WinConfig Module 2.11.0 65693 Wednesday, May 16, 2018 Approved
Boxstarter WinConfig Module 2.10.3 53843 Thursday, July 27, 2017 Approved
Boxstarter WinConfig Module 2.9.27 2624 Wednesday, June 21, 2017 Approved
Boxstarter WinConfig Module 2.9.26 5466 Monday, June 19, 2017 Approved
Boxstarter WinConfig Module 2.9.24 768 Sunday, June 18, 2017 Approved
Boxstarter WinConfig Module 2.9.14 6958 Friday, May 5, 2017 Approved
Boxstarter WinConfig Module 2.9.5 4848 Thursday, March 30, 2017 Approved
Boxstarter WinConfig Module 2.9.2 1160 Monday, March 27, 2017 Approved
Boxstarter WinConfig Module 2.9.0 584 Monday, March 27, 2017 Approved
Boxstarter WinConfig Module 2.8.29 31479 Sunday, May 22, 2016 Approved
Boxstarter WinConfig Module 2.8.27 436 Sunday, May 22, 2016 Approved
Boxstarter WinConfig Module 2.8.21 1108 Thursday, April 28, 2016 Approved
Boxstarter WinConfig Module 2.8.18 746 Tuesday, April 26, 2016 Approved
Boxstarter WinConfig Module 2.8.12 1151 Thursday, April 21, 2016 Approved
Boxstarter WinConfig Module 2.8.0 1154 Friday, April 15, 2016 Approved
Boxstarter WinConfig Module 2.7.0 2040 Sunday, April 3, 2016 Approved
Boxstarter WinConfig Module 2.6.41 3795 Sunday, February 28, 2016 Approved
Boxstarter WinConfig Module 2.6.25 6669 Friday, December 18, 2015 Approved
Boxstarter WinConfig Module 2.6.20 504 Thursday, December 17, 2015 Approved
Boxstarter WinConfig Module 2.6.16 720 Tuesday, December 15, 2015 Approved
Boxstarter WinConfig Module 2.6.2 684 Monday, December 14, 2015 Approved
Boxstarter WinConfig Module 2.6.0 500 Sunday, December 13, 2015 Approved
Boxstarter WinConfig Module 2.5.21 9519 Thursday, August 13, 2015 Approved
Boxstarter WinConfig Module 2.5.19 2046 Sunday, July 26, 2015 Approved
Boxstarter WinConfig Module 2.5.10 1829 Friday, July 10, 2015 Approved
Boxstarter WinConfig Module 2.5.3 1346 Wednesday, July 1, 2015 Approved
Boxstarter WinConfig Module 2.5.1 552 Wednesday, July 1, 2015 Approved
Boxstarter WinConfig Module 2.4.209 4585 Sunday, April 26, 2015 Approved
Boxstarter WinConfig Module 2.4.205 2686 Sunday, April 5, 2015 Approved
Boxstarter WinConfig Module 2.4.196 1499 Friday, March 20, 2015 Approved
Boxstarter WinConfig Module 2.4.188 1305 Monday, March 9, 2015 Approved
Boxstarter WinConfig Module 2.4.183 822 Wednesday, March 4, 2015 Approved
Boxstarter WinConfig Module 2.4.180 525 Tuesday, March 3, 2015 Approved
Boxstarter WinConfig Module 2.4.179 454 Tuesday, March 3, 2015 Approved
Boxstarter WinConfig Module 2.4.159 2791 Sunday, January 18, 2015 Approved
Boxstarter WinConfig Module 2.4.157 683 Thursday, January 15, 2015 Approved
Boxstarter WinConfig Module 2.4.152 839 Monday, January 12, 2015 Approved
Boxstarter WinConfig Module 2.4.149 1385 Friday, December 26, 2014 Approved
Boxstarter WinConfig Module 2.4.146 517 Friday, December 26, 2014 Approved
Boxstarter WinConfig Module 2.4.128 2014 Thursday, November 27, 2014 Approved
Boxstarter WinConfig Module 2.4.123 3854 Wednesday, September 24, 2014 Approved
Boxstarter WinConfig Module 2.4.110 810 Wednesday, September 17, 2014 Approved
Boxstarter WinConfig Module 2.4.93 760 Friday, September 12, 2014 Approved
Boxstarter WinConfig Module 2.4.88 983 Wednesday, September 3, 2014 Approved
Boxstarter WinConfig Module 2.4.87 510 Wednesday, September 3, 2014 Approved
Boxstarter WinConfig Module 2.4.80 2753 Monday, August 4, 2014 Approved
Boxstarter WinConfig Module 2.4.76 494 Sunday, August 3, 2014 Approved
Boxstarter WinConfig Module 2.4.70 645 Thursday, July 31, 2014 Approved
Boxstarter WinConfig Module 2.4.67 718 Wednesday, July 30, 2014 Approved
Boxstarter WinConfig Module 2.4.61 703 Monday, July 28, 2014 Approved
Boxstarter WinConfig Module 2.4.57 526 Sunday, July 27, 2014 Approved
Boxstarter WinConfig Module 2.4.54 633 Wednesday, July 23, 2014 Approved
Boxstarter WinConfig Module 2.4.53 443 Wednesday, July 23, 2014 Approved
Boxstarter WinConfig Module 2.4.51 453 Wednesday, July 23, 2014 Approved
Boxstarter WinConfig Module 2.4.48 542 Tuesday, July 22, 2014 Approved
Boxstarter WinConfig Module 2.4.46 649 Saturday, July 19, 2014 Approved
Boxstarter WinConfig Module 2.4.41 636 Sunday, July 13, 2014 Approved
Boxstarter WinConfig Module 2.4.39 525 Sunday, July 13, 2014 Approved
Boxstarter WinConfig Module 2.4.38 449 Saturday, July 12, 2014 Approved
Boxstarter WinConfig Module 2.4.35 446 Saturday, July 12, 2014 Approved
Boxstarter WinConfig Module 2.4.32 443 Friday, July 11, 2014 Approved
Boxstarter WinConfig Module 2.4.29 1231 Friday, July 4, 2014 Approved
Boxstarter WinConfig Module 2.4.26 1059 Monday, June 23, 2014 Approved
Boxstarter WinConfig Module 2.4.15 3092 Sunday, April 20, 2014 Approved
Boxstarter WinConfig Module 2.4.12 500 Saturday, April 19, 2014 Approved
Boxstarter WinConfig Module 2.4.4 858 Saturday, April 5, 2014 Approved
Boxstarter WinConfig Module 2.4.0 485 Friday, April 4, 2014 Approved
Boxstarter WinConfig Module 2.3.24 1906 Saturday, February 1, 2014 Approved
Boxstarter WinConfig Module 2.3.15 616 Monday, January 27, 2014 Approved
Boxstarter WinConfig Module 2.3.13 462 Saturday, January 25, 2014 Approved
Boxstarter WinConfig Module 2.3.8 568 Thursday, January 23, 2014 Approved
Boxstarter WinConfig Module 2.3.0 571 Monday, January 20, 2014 Approved
Boxstarter WinConfig Module 2.2.78 666 Thursday, January 9, 2014 Approved
Boxstarter WinConfig Module 2.2.59 848 Sunday, December 29, 2013 Approved
Boxstarter WinConfig Module 2.2.23 845 Saturday, December 14, 2013 Approved
Boxstarter WinConfig Module 2.2.16 507 Friday, December 13, 2013 Approved
Boxstarter WinConfig Module 2.2.15 390 Friday, December 13, 2013 Approved
Boxstarter WinConfig Module 2.2.12 469 Friday, December 13, 2013 Approved
BoxStarter WinConfig Module 2.2.0 466 Thursday, December 12, 2013 Approved
BoxStarter WinConfig Module 2.1.0 599 Saturday, November 30, 2013 Approved
BoxStarter WinConfig Module 2.0.25 470 Wednesday, November 20, 2013 Approved
BoxStarter WinConfig Module 2.0.11 458 Monday, November 11, 2013 Approved
BoxStarter WinConfig Module 2.0.4 498 Saturday, November 9, 2013 Approved
BoxStarter WinConfig Module 2.0.1 519 Friday, November 8, 2013 Approved
BoxStarter WinConfig Module 1.1.40 546 Tuesday, October 1, 2013 Approved
BoxStarter WinConfig Module 1.1.35 560 Monday, August 12, 2013 Approved
BoxStarter WinConfig Module 1.1.30 545 Sunday, August 11, 2013 Approved
BoxStarter WinConfig Module 1.1.22 499 Thursday, August 8, 2013 Approved
BoxStarter WinConfig Module 1.1.18 523 Tuesday, August 6, 2013 Approved
BoxStarter WinConfig Module 1.1.12 480 Sunday, August 4, 2013 Approved
BoxStarter WinConfig Module 1.1.0 519 Thursday, August 1, 2013 Approved
BoxStarter WinConfig Module 1.0.33 578 Thursday, April 18, 2013 Approved
BoxStarter WinConfig Module 1.0.20 514 Monday, April 15, 2013 Approved
BoxStarter WinConfig Module 1.0.13 538 Monday, March 25, 2013 Approved
BoxStarter WinConfig Module 1.0.3 536 Wednesday, March 13, 2013 Approved

  • Ensure choco bin is ahead of boxstarter vendored choco bin on the path and dont copy redirect shims to choco bin even if choco is not preinstalled.
  • Provide better isolation between Boxstarter and User Chocolatey installations.
  • Run scheduled tasks in the same directory where it is invoked.
  • Default Windows Update criteria now only installs critical updates.
  • Force elevated shell during setup.bat installer.
Discussion for the Boxstarter WinConfig Module Package

Ground Rules:

  • This discussion is only about Boxstarter WinConfig Module and the Boxstarter WinConfig Module package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Boxstarter WinConfig Module, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus