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

Downloads:

161

Downloads of v 1.0.1:

15

Last Update:

08 Nov 2024

Published Date:

08 Nov 2024

Package Maintainer(s):

Software Author(s):

  • bcurran3

Tags:

bcurran3 unofficial choco powershell sandbox sand box test testing environment packagers maintainers install

Chocolatey Sandbox (unofficial)

(Ready for review)

  • 1
  • 2
  • 3

1.0.1 | Updated: 08 Nov 2024

Downloads:

161

Downloads of v 1.0.1:

15

Published:

08 Nov 2024

Maintainer(s):

Software Author(s):

  • bcurran3

Chocolatey Sandbox (unofficial) 1.0.1

(Ready for review)

Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by bcurran3. The inclusion of bcurran3 trademark(s), if any, upon this webpage is solely to identify bcurran3 goods or services and not for commercial purposes.

  • 1
  • 2
  • 3

Some Checks Are Exempted or Have Failed

Not All Tests Have Passed


Validation Testing Passed


Verification Testing Exemption:

Requires Windows 10/11.

Details

Scan Testing Resulted in Investigate

Details
IMPORTANT

This version is in moderation and has not yet been approved. This means it doesn't show up under normal search.

  • Until approved, you should consider this package version unsafe - it could do very bad things to your system (it probably doesn't but you have been warned, that's why we have moderation).
  • This package version can change wildly over the course of moderation until it is approved. If you install it and it later has changes to this version, you will be out of sync with any changes that have been made to the package. Until approved, you should consider that this package version doesn't even exist.
  • You cannot install this package under normal scenarios. See How to install package version under moderation for more information.
  • There are also no guarantees that it will be approved.
WARNING

There are versions of this package awaiting moderation (possibly just this one). See the Version History section below.

asheroto (maintainer) on 08 Nov 2024 23:12:21 +00:00:

User 'asheroto' (maintainer) submitted package.

asheroto (maintainer) on 08 Nov 2024 23:13:33 +00:00:

User 'asheroto' (maintainer) submitted package.

chocolatey-ops (reviewer) on 08 Nov 2024 23:46:26 +00:00:

choco-sandbox has passed automated validation. It may have or may still fail other checks like testing (verification).
NOTE: No required changes that the validator checks have been flagged! It is appreciated if you fix other items, but only Requirements will hold up a package version from approval. A human review could still turn up issues a computer may not easily find.

Guidelines

Guidelines are strong suggestions that improve the quality of a package version. These are considered something to fix for next time to increase the quality of the package. Over time Guidelines can become Requirements. A package version can be approved without addressing Guideline comments but will reduce the quality of the package.

  • In the Description element of the nuspec file a potentially invalid Url has been found. Recommendation is to fix this URL More...
  • ProjectUrl and ProjectSourceUrl are typically different, but not always. Please ensure that projectSourceUrl is pointing to software source code or remove the field from the nuspec. More...

chocolatey-ops (reviewer) on 08 Nov 2024 23:57:20 +00:00:

choco-sandbox has passed automated virus scanning, however requires human verification.
Package Scan Status Type was: Investigate.
This could mean that the number of scanned files doesn't match the number of expected files, or the files could not be downloaded.
Check the virus scan results for additional information.

Description


choco://choco-sandbox

To use choco:// protocol URLs, install (unofficial) choco:// Protocol support


Screenshot of choco-sandbox

WHAT IS THIS?

Chocolatey Sandbox sets up a customized and customizable Windows Sandbox environment with Chocolatey installed.

WHO IS THIS FOR?

Chocolatey Sandbox is for anyone who may want to "test drive" Chocolatey packages in a sandbox.

FEATURES:

  • Installs Chocolatey from the web on first run and caches it for subsequent runs of the sandbox.
  • Automatically upgrades Chocolatey to the latest version on every run.
  • Automatically sets up the default PowerShell profile with Chocolatey tab completion as well as some shortcuts (cup, cinst, cuninst, clist).
  • Automatically installs packages from packages.config if it exists.
  • Automatically runs choco-sandbox-customize.ps1 for further customization if it exists.

tools\.SkipAutoUninstaller
 
tools\choco-sandbox-customize.ps1.example
 
tools\choco-sandbox.ps1
$ErrorActionPreference = 'Stop'
# Choco-Sandbox.ps1 Copyleft 2023-2024 by Bill Curran AKA BCURRAN3
# LICENSE: GNU GPL v3 - https://www.gnu.org/licenses/gpl.html
# Suggestions? Problems? Open a GitHub issue at https://github.com/bcurran3/ChocolateyPackages/issues

Clear-Host
Write-Host "Choco-Sandbox.ps1 v1.0.1 (2024-08-25) - Sets up Windows Sandbox with Chocolatey Installed" -Foreground White
Write-Host "Copyleft 2023-2024 Bill Curran ([email protected]) - free for personal and commercial use`n" -Foreground White

$InstalledFromWeb=$False

# Allow all scripts to run since its a sandbox
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force

# Add PowerShell profile with Chocolatey tab completion
if (!(Test-Path "C:\Users\WDAGUtilityAccount\Documents\WindowsPowerShell")) { New-Item -Path "C:\Users\WDAGUtilityAccount\Documents" -Name "WindowsPowerShell" -ItemType "Directory" | Out-Null }
Copy-Item "C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\Microsoft.PowerShell_profile.ps1" "C:\Users\WDAGUtilityAccount\Documents\WindowsPowerShell\"

# Install Chocolatey from previously downloadeded file so we don't skew the download count too much for Rob and the boys
if (Test-Path C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\chocolatey.zip){
	Write-Host "  ** Installing Chocolatey from cached download." -Foreground Magenta
	Expand-Archive C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\chocolatey.zip -DestinationPath C:\Windows\Temp\chocolatey -Force | Out-Null
	C:\Windows\Temp\chocolatey\tools\chocolateyInstall.ps1  | Out-Null
	Copy-Item C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\chocolatey.zip C:\ProgramData\chocolatey\lib\chocolatey\chocolatey.nupkg
	Copy-Item C:\Windows\Temp\chocolatey\chocolatey.nuspec C:\ProgramData\chocolatey\lib\chocolatey
#	Remove-Item C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\chocolatey -Recurse -Force
} else {
# Install Chocolatey from the web
    Write-Host "  ** Installing Chocolatey from the web." -Foreground Magenta
    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | Out-Null
# Save chocolatey.zip for future use so we don't have to continuously download it
    Copy-Item C:\ProgramData\chocolatey\lib\chocolatey\chocolatey.nupkg C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\chocolatey.zip -Force
	$InstalledFromWeb=$True
}

# Upgrade Chocolatey if outdated
if (!($InstalledFromWeb)){
	Write-Host "  ** Making sure Chocolatey is up-to-date..." -Foreground Magenta
    choco upgrade chocolatey -y
    Copy-Item C:\ProgramData\chocolatey\lib\chocolatey\chocolatey.nupkg C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\chocolatey.zip -Force
}

# Install packages
if (Test-Path C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\packages.config){
	Write-Host "  ** Installing packages from packages.config..." -Foreground Magenta
	choco install C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\packages.config -y
} else {
	if (Test-Path C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\packages.config.example){
		Write-Host "  ** HINT: Rename packages.config.example to packages.config and edit to have packages automatically installed." -Foreground Cyan
	}
}

# Load Chocolatey PowerShell profile
. $profile

# Run custom script
if (Test-Path C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\choco-sandbox-customize.ps1){
	Write-Host "  ** Running choco-sandbox-customize.ps1..." -Foreground Magenta
	& C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\choco-sandbox-customize.ps1 -ErrorActtion SilentlyContinue
} else {
	if (Test-Path C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox\choco-sandbox-customize.ps1.example){
		Write-Host "  ** HINT: Rename choco-sandbox-customize.ps1.example to choco-sandbox-customize.ps1 and edit to script anything else you want automated." -Foreground Cyan
	}
}

Set-Location "C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox"

Write-Host "`nGo Go Chocolatey Go!" -Foreground White
Write-Host "`nFound Chocolatey Sandbox useful?" -Foreground White
Write-Host "Buy me a beer at https://www.paypal.me/bcurran3donations" -Foreground White
Write-Host "Become a patron at https://www.patreon.com/bcurran3" -Foreground White
tools\choco-sandbox.wsb
 
tools\chocolateyInstall.ps1
$ErrorActionPreference = 'Stop'

$packageName = 'choco-sandbox'
$shortcutName = 'Chocolatey Sandbox.lnk'
$scriptDir = "$(Get-ToolsLocation)\BCURRAN3\choco-sandbox"
$script = 'choco-sandbox.ps1'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$exe = "$toolsDir\choco-sandbox.wsb"

Confirm-WinMinimumBuild 18305

# Update the WSB (config) file if the Chocolatey Tools Location is non-default
if ($(Get-ToolsLocation) -ne "C:\tools") {
    [xml]$WSBConfig = Get-Content "$exe"
    $WSBConfig.Configuration.MappedFolders.MappedFolder.HostFolder = "$scriptDir"
    Write-Host "  ** Updating WSB file with your defined Chocolatey tools dir." -Foreground Magenta
    $WSBConfig.Save("$exe")
}

# New storage location moving forward for all my Chocolatey scripts
if (!(Test-Path "$(Get-ToolsLocation)\BCURRAN3")) { New-Item -Path "$(Get-ToolsLocation)" -Name "BCURRAN3" -ItemType "Directory" | Out-Null }
if (!(Test-Path "$(Get-ToolsLocation)\BCURRAN3\choco-sandbox")) { New-Item -Path "$(Get-ToolsLocation)\BCURRAN3" -Name "choco-sandbox" -ItemType "Directory" | Out-Null }

# Move new files and support files (if applicable)
Move-Item "$toolsDir\$script" "$scriptDir" -Force -ErrorAction SilentlyContinue
Move-Item "$toolsDir\$exe" "$scriptDir" -Force -ErrorAction SilentlyContinue
Move-Item "$toolsDir\choco-sandbox-customize.ps1.example" "$scriptDir" -Force -ErrorAction SilentlyContinue
Move-Item "$toolsDir\Microsoft.PowerShell_profile.ps1" "$scriptDir" -Force -ErrorAction SilentlyContinue
Move-Item "$toolsDir\packages.config.example" "$scriptDir" -Force -ErrorAction SilentlyContinue
Move-Item "$toolsDir\ReadMe.txt" "$scriptDir" -Force -ErrorAction SilentlyContinue

# Make shortcuts
Install-ChocolateyShortcut -shortcutFilePath "$ENV:Public\Desktop\$shortcutName" -targetPath $exe -IconLocation "$toolsDir\Chocolatey Sandbox.ico" -RunAsAdmin
if (Test-Path "$ENV:ProgramData\Microsoft\Windows\Start Menu\Programs\Chocolatey") {
    Install-ChocolateyShortcut -shortcutFilePath "$ENV:ProgramData\Microsoft\Windows\Start Menu\Programs\Chocolatey\$shortcutName" -targetPath $exe -IconLocation "$toolsDir\Chocolatey Sandbox.ico" -RunAsAdmin
} else {
    Install-ChocolateyShortcut -shortcutFilePath "$ENV:ProgramData\Microsoft\Windows\Start Menu\Programs\$shortcutName" -targetPath $exe -IconLocation "$toolsDir\Chocolatey Sandbox.ico" -RunAsAdmin
}
tools\chocolateyUninstall.ps1
$ErrorActionPreference = 'Stop'

$packageName = 'choco-windows-sandbox'
$shortcutName = 'Chocolatey Sandbox.lnk'
$scriptDir = "$(Get-ToolsLocation)\BCURRAN3\choco-sandbox"

Remove-Item "$scriptDir" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$ENV:Public\Desktop\$shortcutName" -Force -ErrorAction SilentlyContinue
Remove-Item "$ENV:ProgramData\Microsoft\Windows\Start Menu\Programs\Chocolatey\$shortcutName" -Force -ErrorAction SilentlyContinue
Remove-Item "$ENV:ProgramData\Microsoft\Windows\Start Menu\Programs\$shortcutName" -Force -ErrorAction SilentlyContinue
tools\Microsoft.PowerShell_profile.ps1
$ErrorActionPreference = 'Stop'

# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
  Import-Module "$ChocolateyProfile"
}
function cinst { choco install $args }
function cuninst { choco uninstall $args }
function cup { choco upgrade $args }
function clist { choco list $args }
function cweb {
  param ([string]$package ) 
  if (($package -eq '') -or ($package -eq '.')) { $package = (Split-Path -Leaf $(Get-Location).Path) }
  start https://community.chocolatey.org/packages/$package
}
tools\packages.config.example
 
tools\ReadMe.txt
Choco-Sandbox.ps1 v1.0.0 (2023-10-02) - Sets up Windows Sandbox with Chocolatey Installed
Copyleft 2023 Bill Curran ([email protected]) - free for personal and commercial use


You can customize your choco-sandbox environment further by editing any of the files
mentioned below. If your ChocolateyToolsDir is writeable by the host computer's Users group,
you can edit the files from within the sandbox in the C:\Users\WDAGUtilityAccount\Desktop\choco-sandbox
folder. Otherwise edit them outside the sandbox in the paths mentioned.

C:\tools\BCURRAN3\choco-sandbox\
- You can put any files you want in here and they will remain unless you uninstall choco-sandbox.

C:\tools\BCURRAN3\choco-sandbox\packages.config.example
- Rename to packages.config and edit for any Chocolatey packages you want to have installed
  automatically. If you just rename it, it will install Google Chrome.

C:\tools\BCURRAN3\choco-sandbox\choco-sandbox-customize.ps1.example
- Rename to choco-sandbox-customize.ps1 and edit. It will run in the sandbox after everything else
  is done. You can use this for any further customization you want done automatically in the 
  sandbox; i.e. enable more Chocolatey features, map drives, edit registry keys, etc. If you just
  rename it, it will run choco feature enable -n allowGlobalConfirmation.

C:\tools\BCURRAN3\choco-sandbox\Microsoft.PowerShell_profile.ps1
- Edit this to modify your default PowerShell profile in the sandbox. It will be copied on every
  run of Chocolatey Sandbox. This could be overwritten if choco-sandbox is ever updated.

C:\ProgramData\chocolatey\lib\choco-sandbox\tools\choco-sandbox.wsb
- Edit this (XML file) to add more mapped folders; i.e. c:\shared. More info at:
  https://learn.microsoft.com/en-us/windows/security/application-security/application-isolation/windows-sandbox/windows-sandbox-configure-using-wsb-file
  This could be overwritten if choco-sandbox is ever updated.

Found Chocolatey Sandbox useful?
Buy me a beer at https://www.paypal.me/bcurran3donations
Become a patron at https://www.patreon.com/bcurran3

No results available for this package. We are building up results for older packages over time so expect to see results. If this is a new package, it should have results within a day or two.

Add to Builder Version Downloads Last Updated Status
Chocolatey Sandbox (unofficial) 1.0.1 15 Friday, November 8, 2024 Ready

CHANGELOG:

  • 1.0.1 - choco commands in choco-sandbox.ps1 now use -y, chocolatey package cache handling changed for better compatibility, added hints to choco-sandbox.ps1
  • 1.0.0 - Initial release. No upgrades or features planned, only maintenance if needed for future Windows or Windows Sandbox compatibility.
Discussion for the Chocolatey Sandbox (unofficial) Package

Ground Rules:

  • This discussion is only about Chocolatey Sandbox (unofficial) and the Chocolatey Sandbox (unofficial) 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 Chocolatey Sandbox (unofficial), 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