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 installChocolatey 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
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.
There are versions of this package awaiting moderation (possibly just this one). See the Version History section below.
choco://choco-sandbox
To use choco:// protocol URLs, install (unofficial) choco:// Protocol support
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.
$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
$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
$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
}
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 | |
(unofficial) Chocolatey Sandbox 1.0.0 | 146 | Thursday, November 2, 2023 | Approved |
public domain
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.
-
- chocolatey-os-dependency.extension (≥ 0.0.1)
- windows-sandbox (≥ 0.0.1)
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.
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.
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.