Create a normal Chocolatey Package

Update-ExecutionPolicy Unrestricted
Move-LibraryDirectory "Personal" "$env:UserProfile\skydrive\documents"
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop

cinstm VisualStudioExpress2012Web
cinstm fiddler
cinstm mssqlserver2012express
cinstm git-credential-winstore
cinstm console-devel
cinstm skydrive
cinstm poshgit

cinst Microsoft-Hyper-V-All -source windowsFeatures
cinst IIS-WebServerRole -source windowsfeatures
cinst TelnetClient -source windowsFeatures

Install-ChocolateyPinnedTaskBarItem "$env:programfiles\console\console.exe"

copy-item (Join-Path (Get-PackageRoot($MyInvocation)) 'console.xml') -Force $env:appdata\console\console.xml

Install-ChocolateyVsixPackage xunit http://visualstudiogallery.msdn.microsoft.com/463c5987-f82b-46c8-a97e-b1cde42b9099/file/66837/1/xunit.runner.visualstudio.vsix

Install-WindowsUpdate -AcceptEula

This package sets up my environment like so:
  • Makes a few windows environment tweaks (moves MyDocuments to skydrive, adjusts windows explorer options, etc)
  • Installs some developer apps like Visual Studio
  • Adds some Windows features like IIS and Hyper-V
  • Pins the console I installed to the task bar and copies its configuration file
  • Adds the X-Unit VisualStudio Extension
  • Installs all critical windows updates.

Push your package

When you run Boxstarter from the ClickOnce Web Launcher, it will probe both the Chocolatey.org feed and the Boxstarter community feed on MyGet.org.

nuget push Example.1.0.0.nupkg <Your MyGet API Key> -Source https://www.myget.org/F/boxstarter/api/v2/package

To host private feeds, use the Boxstarter modules directly. Boxstarter may support the web launcher for private feeds in the future.

Launch the Boxstarter Web Launcher

http://boxstarter.org/package/<your package name>
Of coarse, <your package name> is the package id of the above chocolatey package. Here our package is called Example. You must use a ClickOnce compatible browser like IE or install the ClickOnce extensions for Chrome or Firefox.

If you prefer a command line, this works from either a normal Windows command line or Powershell console:

START http://boxstarter.org/package/Example

Install Boxstarter

Install.png

This is going to install the Boxstarter Powershell modules to a temporary area on your machine.

Elevate Privileges

elevate.png

Boxstarter needs to run with elevated privileges. Click yes to allow it to do so.

Enter your Windows password for automatic logins

Boxstarter will setup your machine to automatically login after each reboot during the Boxstarter install. This ensures a truly unattended session. The password will not be visible on the screen. It is encrypted and stored in a special place in windows that is intended for encrypted passwords. Boxstarter will remove it when the installation is complete.

console.png

Note: If you want to disable reboots and thereby suppress the password prompt, you can use this URL to invoke Boxstarter:
Http://boxstarter.org/package/nr/<Package Name>

Your new box is waiting!

Boxstarter installs Chocolatey and the .Net Framework v4 if not already installed. Boxstarter will then install the package you specified in the boxstarter URL. The Example package here. Boxstarter will search both the public Chocolatey.Org feed and the Boxstarter Myget Community feed.

Last edited Oct 27, 2013 at 1:23 AM by mwrock, version 20