Coder Social home page Coder Social logo

chocolatey / boxstarter Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 163.0 9.89 MB

Repeatable, reboot resilient windows environment installations made easy using Chocolatey packages

Home Page: https://boxstarter.org/

License: Apache License 2.0

PowerShell 72.09% C# 0.30% Python 27.38% CSS 0.16% Batchfile 0.07%
hacktoberfest

boxstarter's Introduction

THIS REPOSITORY IS DEPRECATED

See https://github.com/chocolatey/choco for further development

Chocolatey NuGet (like apt-get, but for Windows) Build status

Chocolatey Logo

WEBSITE

Chocolatey.org

LICENSE

Apache 2.0 - see docs/legal (just LEGAL in the zip folder)

INFO

##Please see the wiki

SOURCE REQUIREMENTS

  • .NET Framework 4.0
  • PowerShell 2.0+

CREDITS

See docs/legal/CREDITS (just LEGAL/Credits in the zip folder)

boxstarter's People

Contributors

admiringworm avatar bkazoo avatar dajo avatar ddbtrmatic avatar demdante avatar dragon788 avatar eeevans avatar eldonferranpol avatar flcdrg avatar gep13 avatar holisticdeveloper avatar htnhan avatar icnocop avatar it-praktyk avatar jawn avatar jpruskin avatar jstojanovski-scwx avatar mdonoughe avatar mwallner avatar mwallnerks avatar mwrock avatar pauby avatar philoushka avatar riezebosch avatar sayresvt avatar smartmarmot avatar st3phhays avatar windos avatar wspait avatar xt0rted avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boxstarter's Issues

Boxstarter window closes before I can read the error message

migrated from https://boxstarter.codeplex.com/workitem/86

I tried using the Boxstarter web launcher today to set up a new machine. However, chocolatey.org is currently "offline for maintenance" and requests to http://chocolatey.org/install.ps1 fail with a 503 error. This causes the script to fail, but the reason is not obvious just from observing the console window.

The console displays the following:
Boxstarter may need to reboot your system.
Please provide your password so that Boxstarter may automatically log you on.
Your password will be security stored and encrypted.
Autologon Password: **********
Boxstarter: Successfully authenticated password.
Boxstarter: Disabling Automatic Updates from Windows Update
Boxstarter: Chocolatey not installed. Downloading and installing...
Boxstarter: Enabling Automatic Updates from Windows Update
Type ENTER to exit:
At this point, I can press Enter and a red error will be briefly displayed in the console, but the window closes before I can read the message.

I would expect this error would be displayed immediately when it occurs, rather than waiting for me to press Enter. Even better, Boxstarter should handle this and display its own error, perhaps something like "Boxstarter: Failed to install Chocolatey, see boxstarter.log for details."

Exceptions not captured in Boxstarter.log

I noticed red text scroll by in PowerShell while my script was running in a VM. Boxstarter.log had no record of it. I deduced it was the following call because the file being downloaded was incomplete/corrupt:

(New-Object System.Net.WebClient).DownloadFile($url, $destination)

I tried doing a manual throw in PowerShell, and it didn't get captured either. Is boxstarter.log supposed to capture exception output? It would be nice if it did.

Details that might be pertinent: The starting script installs Chocolatey and Boxstarter, builds NuGet packages from .ps1 files using New-PackageFromScript, then installs them all via a single call to Install-BoxstarterPackage. Packages avoid re-running lots of code after each reboot. Each of the packages sets $Boxstarter.log to c:\vagrant, a directory shared with the host machine.

Invoke-BoxstarterBuild without package name doesn't build all the packages

In the documentation it states that I should be able to build all of the packages in my local repo but when I issue invoke-boxstarterbuild I get the following output

Invoke-BoxStarterBuild : Parameter set cannot be resolved using the specified name parameters.
At line:1 char:1

Adding the PackageName and it works fine.

Install-windowsupdate error when restarting

migrated from https://boxstarter.codeplex.com/workitem/57

When using the command Install-windowsupdate from BoxstarterShell everything works until the first restart. Errormessage as follows:

+ Boxstarter starting Downloading 1 updates
+ Boxstarter finished Downloading 1 updates 00:00:03.6635341
+ Boxstarter starting Installing Updates
This may take several minutes...
Boxstarter: Restart Required. Restarting now...
+ Boxstarter finished Installing Updates 00:41:21.6046543
Boxstarter: writing restart file
You cannot call a method on a null-valued expression.
At C:\Users\MyUser\AppData\Roaming\Boxstarter\Boxstarter.Bootstrapper\Invoke-Reboot.ps1:38 char:32
+ $Boxstarter.NoPassword.ToString <<<< ()
    + CategoryInfo          : InvalidOperation: (ToString:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

PS C:\>  

Boxstarter Intermittently Failing to Install

I have a 'DeveloperWorkstation' boxstarter package that usually installs fine. I've been testing via a VM and sometimes I would get an Exception in the console that would close before I could read it. I wrapped the install logic in a Try {} Catch {} block which didn't seem to help.

Now, I have a VM that is permanently buggered, even when I run

Install-BoxstarterPackage DeveloperWorkstation -Verbose

by hand.

A gist of the output is here: https://gist.github.com/skyguy94/cc1db8eaa2fb14caded6

I'm looking for help in digging deeper into the issue, but I'm not sure what the best way to debug Boxstarter is. I was hoping for more debug info, but the debug preferences seemed to have no effect, or I did it wrong.

Needing to rerun Boxstarter multiple times and still doesn't complete

Migrated from https://boxstarter.codeplex.com/workitem/71

OS: win 7 x64 Evaluation version running in Vmware Fusion VM

Since WebLauncher didn't work I manually installed Chocolatey and then Boxstarter and then from Boxstarter shell ran this:

PS C:> Install-BoxstarterPackage -PackageName https://gist.githubusercontent.co
m/clarity99/123650a8387d3fc8bd79/raw/gistfile1.txt

This started working but with various issues. SP1 dialog was left on the screen.
I had to restart process a few times to continue with the installation and finally it came to this:

PS C:> Install-BoxstarterPackage -PackageName https://gist.githubusercontent.co
m/clarity99/123650a8387d3fc8bd79/raw/gistfile1.txt
Boxstarter: Installing package https://gist.githubusercontent.com/clarity99/1236
50a8387d3fc8bd79/raw/gistfile1.txt
Boxstarter Version 2.4.15
(c) 2014 Matt Wrock. http://boxstarter.org

Boxstarter: Disabling Automatic Updates from Windows Update
Calling 'C:\Chocolatey\chocolateyinstall\nuget.exe pack temp_BoxstarterPackage\t
emp_BoxstarterPackage.nuspec -NoPackageAnalysis'.
Attempting to build package from 'temp_BoxstarterPackage.nuspec'.
Successfully created package 'C:\Users\rob\AppData\Roaming\Boxstarter\BuildPacka
ges\temp_BoxstarterPackage.1.0.0.nupkg'.

Boxstarter: Created a temporary package temp_BoxstarterPackage from https://gist .githubusercontent.com/clarity99/123650a8387d3fc8bd79/raw/gistfile1.txt in C:\Us
ers\rob\AppData\Roaming\Boxstarter\BuildPackages
Boxstarter starting Calling Chocolatey to install temp_BoxstarterPackage. This
may take several minutes to complete...
Chocolatey (v0.9.8.23) is installing 'temp_BoxstarterPackage' and dependencies.
By installing you accept the license for 'temp_BoxstarterPackage' and each depen
dency you are installing.
'temp_BoxstarterPackage 1.0.0' already installed.
If you want to reinstall the current version of an existing package, please use
the -force command.
Finished installing 'temp_BoxstarterPackage' and dependencies - if errors not sh
own in console, none detected. Check log for errors if unsure.
Boxstarter finished Calling Chocolatey to install temp_BoxstarterPackage. This
may take several minutes to complete... 00:00:02.1211673
Boxstarter: Enabling Automatic Updates from Windows Update
Completed : True
Errors : {}
ComputerName : localhost
StartTime : 05/04/2014 19:22:45
FinishTime : 05/04/2014 19:22:50

However, it only installed up to an including NugetPackageExplorer.

Now, it won't continue.

Boxstarter keeps rebooting (stuck in boot loop)

Migrated from https://boxstarter.codeplex.com/workitem/61

Hi there! This is my first time using Boxstarter, so I'm pretty sure I'm doing something wrong, but the end result is that the machine keeps restarting, and will do so indefinitely, until I actually go to the desktop and kill the Boxstarter process in between reboots.

A few specifics:
this is a brand new Asus laptop that I just bought for my wife, and it came with Windows 8.1 pre-installed
the Gist that I'm using
I'm trying to do a "Launch from Web", using this URL: http://boxstarter.org/package/url?https://gist.githubusercontent.com/danrochman/13398e4427c1f2c5919e/raw/16c6db0ab488338a2195f5674b74cd33842b876a/boxstarter-efa-asus.txt
Everything seems to work well at first, but then it says "Restart Required", and restarts the machine. As soon as it can, it seems to go through the exact same process again. And again. I have to catch/kill the window in order to get it to stop. I have a (blurry, sorry) photo of the window here. Same window comes up every time.

Happy to share log files or other details - just let me know what (if anything) might be helpful. Thanks!!

Docs - Installing web services and deploying a web application to a remote server

Is Step 4 in http://boxstarter.org/Learn/RemotePackageWithArtifacts correct? Emphasis mine.

Create the Package

Lets assume that you saved the above Visual Studio project to c:\dev\NugetServer. You can now create a package with the artifacts of this project embedded in the package:

New-BoxstarterPackage -Name NugetFeedApp
Copy-Item c:\dev\NugetServer "$($Boxstarter.LocalRepo)\NugetServer" -Recurse -Force

This creates a skeleton Chocolatey package with the contents of your NugetServer application embedded in the package. You will need to complete the ChocolateyInstall.ps1 file.

Should NugetFeedApp be NugetServer? NugetFeedApp does not appear anywhere else on the page.

OneDrive Commands

Is it planned to add OneDrive Commands?
Things I would like to do is:
Move-OneDriveDirectory
Set-OneDriveOptions Enable/DisableMakeAllFilesAvailableOffline
And a way start a sync explicitly and be notified/continue when it finished (much like windows updates).

Errors not reported when boxstarter package reboots machine

Hello. I've noticed that sometimes when a chocolatey install fails, BoxStarter does not report the error in the log file. So if you aren't watching the console, you could miss a legitimate error. I'm unsure if this is specific to chocolatey install failures or applies to any failure when running a BoxStarter package (e.g. custom powershell). I was able to create this minimal test case to reproduce the error (clean/vanilla Windows 8.1 machine with all windows updates as of today)

test.ps1

if ( Get-UAC )
{
    Disable-UAC
    Invoke-Reboot
}
cinst nuget.commandline
# force error by extracting to c:\windows\system32
cinst sqlserver2014express
cinst GoogleChrome

execution

BoxstarterShell.bat
$creds = Get-Credential
Install-BoxstarterPackage -PackageName PATH_TO_TEST_PS1 -Credential $creds

When SQL Server is installing (sorry for the large download!), choose c:\windows\system32\SqlServer2014ExpressInstall\ to extract files, which will force an error in the install. Notice how the error is reported in the console. Boxstarter continues and installs Chrome, but the error doesn't appear in the log file. Here's the log file: https://gist.github.com/SurajGupta/307aec9b6ce00330ecff

And the console/package install session ends with the following:
"Type ENTER to exit"

Now try a package with no reboot:

cinst nuget.commandline
# force error by extracting to c:\windows\system32
cinst sqlserver2014express
cinst GoogleChrome

The error still shows up in the console. But now the log file shows the error. Here's the log file: https://gist.github.com/SurajGupta/535c80ac41a40cc7f4f0

Also, the console/package install session ends with the following:

Errors       : {Package 'SqlServer2014Express v1.0.1' did not install successfully: [ERROR] Running C:\Users\suraj\AppD
               ata\Local\Temp\chocolatey\SqlServer2014Express\SqlServer2014ExpressInstall.exe with   was not successful
               . Exit code was '-2147467259'., SqlServer2014Express did not finish successfully. Boo to the chocolatey
               gods!
               -----------------------
               [ERROR] [ERROR] Running C:\Users\suraj\AppData\Local\Temp\chocolatey\SqlServer2014Express\SqlServer2014E
               xpressInstall.exe with   was not successful. Exit code was '-2147467259'.
               -----------------------, [ERROR] Running C:\Users\suraj\AppData\Local\Temp\chocolatey\SqlServer2014Expre
           ss\SqlServer2014ExpressInstall.exe with   was not successful. Exit code was '-2147467259'.}
ComputerName : localhost
Completed    : True
FinishTime   : 01/06/2015 08:55:33
StartTime    : 01/06/2015 08:47:46

So it seems that the restart somehow puts Boxstarter into a state where it does not report errors.

Invoke-FromTask: Unable to run scheduled task (no message)

Migrated from https://boxstarter.codeplex.com/workitem/69

I'm trying to use the Invoke-FromTask command in the Boxstarter.Common with no success. Suggestions?

Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.

PS C:\Users\vagrant> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1
PS C:\Users\vagrant> boxstarter

Boxstarter: Installing Chocolatey
Boxstarter Version 2.4.15
(c) 2014 Matt Wrock. http://boxstarter.org

Boxstarter: Disabling Automatic Updates from Windows Update
True
Boxstarter: Enabling Automatic Updates from Windows Update
PS C:\Users\vagrant> boxstartershell

C:\Users\vagrant>powershell.exe -ExecutionPolicy bypass -NoExit -Command "&'C:\Users\vagrant\AppData\Roaming\Boxstarter\BoxstarterShell.ps1'"

Welcome to the Boxstarter shell!
The Boxstarter commands have been imported from C:\Users\vagrant\AppData\Roaming\Boxstarter and are available for you to run in this shell.
You may also import them into the shell of your choice.

Here are some commands to get you started:
Install a Package:   Install-BoxstarterPackage
Create a Package:    New-BoxstarterPackage
Build a Package:     Invoke-BoxstarterBuild
Enable a VM:         Enable-BoxstarterVM
For Command help:    Get-Help <Command Name> -Full

For Boxstarter documentation, source code, to report bugs or participate in discussions, please visit http://boxstarter.org

PS C:\> Import-Module Boxstarter.Common

WARNING: The names of some imported commands from the module 'Boxstarter.Common' include unapproved verbs that might make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.

PS C:\> Invoke-FromTask "DISM /Online /Online /NoRestart /Enable-Feature /Telnet-Client" -IdleTimeout 20

ERROR: The system cannot find the file specified.
Unable to run scheduled task. Message from task was
At C:\Users\vagrant\AppData\Roaming\Boxstarter\Boxstarter.Common\Invoke-FromTask.ps1:108 char:9
+         throw "Unable to run scheduled task. Message from task was $taskResult"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Unable to run s... from task was :String) [], RuntimeException
    + FullyQualifiedErrorId : Unable to run scheduled task. Message from task was

SQL 2014 Remote Install into Hyper-V Guest with boxstarter task has exceeded its timeout with no activity

Hi,

I'm using this Gist : https://gist.github.com/johnkattenhorn/cc77c268a713a029aa15#file-testsql2014express-ps1

NOTE: This is no longer using SQL Express as the SQL2014Express setup has an issue which results in not being able to find the SKU when run using boxstarter remotely :-)

The setup seems to be running fine on the guest until this message appears on the HostMachine (which I'm running the boxstarter script from).

Task has exceed it's timeout with no activity. Killing Task ...

Is there a way to override the timeout value ?

Thanks

John

temp_BoxstarterPackage.1.0.0.nupkg should be created in %temp%

Migrated from https://boxstarter.codeplex.com/workitem/62

Use case:
Background: the boxstarter installation is stored in a network share (\server\boxstarter) to make it available for new bare hosts. (see http://boxstarter.org/InstallingPackages, "Running an Install from a network share or external media")

If boxstarter.bat then is used to execute a text script (as described here: http://boxstarter.org/WebLauncher, install from a gist) a temporary boxstarter package (temp_BoxstarterPackage.1.0.0.nupkg) is created in $boxstarter.basedir\BuildPackages on the share.

This effectively turns $boxstarter.basedir\BuildPackages\temp_BoxstarterPackage.1.0.0.nupkg into a shared mutable state which will lead to problems if multiple bare hosts runs boxstarter from the same share but with different text scripts at the same time.

Suggestion: (by Matt Wrock: https://twitter.com/mwrockx/status/445610173160120320)
temp packages created when running text scripts should be stored in the bare host's %temp% directory.

Create-BoxstarterTask.ps1, has a different computed hash than specified in manifest.

I am new to box starter but I have a new script that was working yesterday on a plain vanilla Windows 8.1 Pro x64 VM.

When I try to run the following command from step 3 (http://boxstarter.org/WebLauncher) from an elevated command prompt, I am getting the following error below:

START http://boxstarter.org/package/nr/url?https://gist.github.com/mwrock/7382880/raw/f6525387b4b524b8eccef6ed4d5ec219c82c0ac7/gistfile1.txt

I tried the following unsuccessful workaround - I installed chocolately on the VM by running the following command in an elevated command prompt from http://chocolatey.org/

@PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

Here is the specific error message:
Create-BoxstarterTask.ps1, has a different computed hash than specified in manifest.

PLATFORM VERSION INFO
Windows : 6.2.9200.0 (Win32NT)
Common Language Runtime : 4.0.30319.34014
System.Deployment.dll : 4.0.30319.33440 built by: FX45W81RTMREL
clr.dll : 4.0.30319.34014 built by: FX45W81RTMGDR
dfdll.dll : 4.0.30319.33440 built by: FX45W81RTMREL
dfshim.dll : 6.3.9600.16384 (winblue_rtm.130821-1623)

SOURCES
Deployment url : http://boxstarter.org/launch/Boxstarter.WebLaunch.Application?noreboot=1&package=https://gist.github.com/mwrock/7382880/raw/f6525387b4b524b8eccef6ed4d5ec219c82c0ac7/gistfile1.txt&https://gist.github.com/mwrock/7382880/raw/f6525387b4b524b8eccef6ed4d5ec219c82c0ac7/gistfile1.txt
Server : Microsoft-IIS/8.0
X-Powered-By : ASP.NET
Application url : http://boxstarter.org/launch/Application%20Files/Boxstarter.WebLaunch_2_4_93_0/Boxstarter.WebLaunch.exe.manifest
Server : Microsoft-IIS/8.0
X-Powered-By : ASP.NET

IDENTITIES
Deployment Identity : Boxstarter.WebLaunch.application, Version=2.4.93.0, Culture=neutral, PublicKeyToken=b971437cd3e1b01e, processorArchitecture=msil
Application Identity : Boxstarter.WebLaunch.exe, Version=2.4.93.0, Culture=neutral, PublicKeyToken=b971437cd3e1b01e, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
* Online only application.
* Trust url parameter is set.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of http://boxstarter.org/launch/Boxstarter.WebLaunch.Application?noreboot=1&package=https://gist.github.com/mwrock/7382880/raw/f6525387b4b524b8eccef6ed4d5ec219c82c0ac7/gistfile1.txt&https://gist.github.com/mwrock/7382880/raw/f6525387b4b524b8eccef6ed4d5ec219c82c0ac7/gistfile1.txt resulted in exception. Following failure messages were detected:
+ File, Create-BoxstarterTask.ps1, has a different computed hash than specified in manifest.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
There were no warnings during this operation.

OPERATION PROGRESS STATUS
* [9/17/2014 11:25:45 AM] : Activation of http://boxstarter.org/launch/Boxstarter.WebLaunch.Application?noreboot=1&package=https://gist.github.com/mwrock/7382880/raw/f6525387b4b524b8eccef6ed4d5ec219c82c0ac7/gistfile1.txt&https://gist.github.com/mwrock/7382880/raw/f6525387b4b524b8eccef6ed4d5ec219c82c0ac7/gistfile1.txt has started.
* [9/17/2014 11:25:46 AM] : Processing of deployment manifest has successfully completed.
* [9/17/2014 11:25:46 AM] : Installation of the application has started.
* [9/17/2014 11:25:46 AM] : Processing of application manifest has successfully completed.
* [9/17/2014 11:25:52 AM] : Request of trust and detection of platform is complete.

ERROR DETAILS
Following errors were detected during this operation.
* [9/17/2014 11:26:09 AM] System.Deployment.Application.InvalidDeploymentException (HashValidation)
- File, Create-BoxstarterTask.ps1, has a different computed hash than specified in manifest.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, Hash hash)
at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, HashCollection hashCollection)
at System.Deployment.Application.ComponentVerifier.VerifyComponents()
at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.

Possible Improved UAC Implementation

Hello,
I have created courses and guides for the nitty gritty internals of UAC. (here is one example: http://csi-windows.com/toolkit/uac-prompt-guide).

I read that Boxstarter disables and reenables UAC simply to suppress the UAC prompt. DIsabling UAC can have several consequence on software installs.

One way to completely side step these issues is to enable the automatic approval of the prompt and then disable it when done.

If you set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, Value "ConsentPromptBehaviorAdmin" to 0 (DWORD) you should see that prompts disappear even though UAC remains intact.

Boxstarter is slow and/or offline

Downloads of the initial boxstarter trusted server app goes very slow, like 5K/s, and often doesn't finish. A (Windows) dialog appears asking me to check my internet connection.

However, internet is fine. Sometimes I cannot reach Boxstarter.org at this moment.

Are these temporary issues? Do you need a mirror for the binary?

Installing using Chocolately packages using BoxStart remotely fails if the package opens a dialogue box.

I'm not sure if this should be here since the Visual Studio 2013 packages work fine but if I try to install either of these packages using Boxstarter remotely they fail with the same error:

cinst mssql2014express-defaultinstance
cinst MsSqlServerManagementStudio2014Express

Error : Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation (Need to double-check the exact working).

Running the same BoxStarter Script on the machine works fine, I'm wondering what would needed to be done to the packages to make them work remotely I guess I need to look for an option to supress the dialog boxes :-)

Allow small message after copyright notice

Is there a way, or could there be a detection for 'trusted sources', where one can optionally show a line or two of text below your copyright notice in the console output of boxstarter?

When testing the alpha version of the software installation automation page at Windows Remix on random non-technical people, they often mention they feel untrusting about the sudden "hacker screen" with no mention of the original page where they clicked on a button. They would like to see "something" reassuring connecting the two.

What is your thought on this?

Boxstarter Version x
(c) Matt Wrock. http://boxstarter.org

Running for http://...
<custom text here>

Normal boxstarter output here

Transferring big files fails

I have several chocolatey packages that I have made that exceed 100MB. I have packaged these inside a Boxstarter package. When using Install-BoxstarterPackage against remote computers the boxstarter package fails to transfer due to out-of-memory exception.

The solution to this may require a custom configuration profile.

I attempted to create a custom session against a custom profile.

Restore-VMSnapshot -Name $snapshot -VMNAME "BoxstarterTest" -Confirm:$false
$Session = New-PSSession -ComputerName 192.168.1.30 -ConfigurationName DataNoLimits -Credential $credential

try {
    Write-Host "Installing on BoxstarterTest"
    Install-BoxstarterPackage -Session $Session -PackageName "MyCustomApp" -LocalRepo "C:\Apps\boxstarter\packages" -Credential $credential
} catch {
    Remove-PSSession -Session $Session -Confirm:$false
}

However this fails with a System.AccessViolationException

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at System.ComponentModel.Composition.Hosting.CompositionContainer.Dispose(Boolean disposing)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.Dispose()
   at NuGet.Program.Initialize(IFileSystem fileSystem, IConsole console)
   at NuGet.Program.Main(String[] args)

Command 'install' failed (sometimes this indicates a partial failure). Additional info/packages: MyCustomApp
Chocolatey reported an unsuccessful exit code of 1
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error
    + PSComputerName        : 192.168.1.30

Add Map Network Drive ability

Mapping network drives can be quite cumbersome within a Boxstarter run as the run is done as administrator. Would be good to research how we could get BoxStarter to execute a network drive map as the current user and wrap it in a CmdLet.

Currently, I map my network drives as part of a batch file the subsequently calls the boxstarter web application to kick off my installations:

@powershell -Command "& {   $creds = Get-Credential myUsername ;    New-PSDrive -Name S -PSProvider FileSystem -Scope global -Root '\\system\share1' -Persist -Credential $creds ;  New-PSDrive -Name Z -PSProvider FileSystem -Scope global -Root '\\system\share2' -Persist ;     New-PSDrive -Name P -PSProvider FileSystem -Scope global -Root '\\system\share3' -Persist ;}"
start http://boxstarter.org/package/nr/url?<my gist>

Add option to disable desktop icon

An option when installing with chocolatey for disabling Boxstarter desktop icon would be nice.
I often use Boxstarter at customers computers but on every update of Boxstarter the desktop icon will be created if not exists.

Can't deploy packet's

Hello,

I'm trying to deploy a boxstarter package on a computer. However, I found a reported issue, which was closed but not solved, so I basicly copy it's content.

Issue 1: when Boxstarter attempts to copy the Boxstarter modules to the remote computer, it fails to extract boxstarter.zip (the boxstarter.zip file is present in the temp directory along with the empty directory BuildPackages)

Issue 2: It I manually extract the files, Boxstarter will still fail when invoking Install-BoxstarterPackageOnComputer

Scriptoutput:

$cred=Get-Credential "OCC\Administrator"
# also tried my user (rw1 with local Administrator right's)
$computers="OCC-93"
$result = Install-BoxstarterPackage -Force -Verbose -ComputerName $computers -PackageName dev-base -Credential $cred
Console output (Issue 1):
Boxstarter Version 2.4.110
(c) 2014 Matt Wrock. http://boxstarter.org
Boxstarter: Configuring local PowerShell Remoting settings...
Boxstarter: Configuring CredSSP settings...
Boxstarter: Testing remoting access on OCC-93...
Boxstarter: Remoting is accessible on OCC-93
Boxstarter: Copying Boxstarter Modules and LocalRepo packages at C:\Users\rw1\Ap
pData\Roaming\Boxstarter to C:\Users\rw1\AppData\Local\Temp on OCC-93...
Boxstarter: Copying Boxstarter Modules and LocalRepo packages at C:\Users\rw1\Ap
pData\Roaming\Boxstarter to C:\Users\rw1\AppData\Local\Temp on OCC-93...
Boxstarter: Copying Boxstarter Modules and LocalRepo packages at C:\Users\rw1\Ap
pData\Roaming\Boxstarter to C:\Users\rw1\AppData\Local\Temp on OCC-93...
Boxstarter: Copying Boxstarter Modules and LocalRepo packages at C:\Users\rw1\Ap
pData\Roaming\Boxstarter to C:\Users\rw1\AppData\Local\Temp on OCC-93...
Boxstarter: Copying Boxstarter Modules and LocalRepo packages at C:\Users\rw1\Ap
pData\Roaming\Boxstarter to C:\Users\rw1\AppData\Local\Temp on OCC-93...
Write-Error : Ausnahme beim Aufrufen von "ReadAllBytes" mit 1 Argument(en):
"Das angegebene Pfadformat wird nicht unterstützt."
In C:\Users\rw1\AppData\Roaming\Boxstarter\Boxstarter.Chocolatey\Install-Boxsta
rterPackage.ps1:458 Zeichen:9
-         Write-Error $_
-         ~~~~~~~~~~~~~~
  - CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorExcep
    tion
  - FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
    n,Write-Error

Errors       : {Ausnahme beim Aufrufen von "ReadAllBytes" mit 1 Argument(en):
               "Das angegebene Pfadformat wird nicht unterstützt.", Ausnahme
               beim Aufrufen von "ReadAllBytes" mit 1 Argument(en):  "Das
               angegebene Pfadformat wird nicht unterstützt."}
ComputerName : OCC-93
Completed    : False
FinishTime   : 29.09.2014 09:48:10
StartTime    : 29.09.2014 09:48:00

Boxstarter: Rolling back remoting settings changed by Boxstarter...

Any ideas?

"Windows will reboot in 15 minutes"

While my boxstarter script was running, I got this popup: Windows Reboot and it did. Only that it was not initiated by boxstarter, which was itself still installing windows updates.

This machine was then obviously busted. This is a critical issue in my opinion. I've updated my boxstarter script with this line:

New-ItemProperty "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\au" -Name "NoAutoRebootWithLoggedOnUsers" -PropertyType "DWord" -Value 1

To disable automatic updating. Still need to test if this helps. But this should be automatically done and maybe reset to the original value when boxstarter finishes (unless the user resets it himself. Maybe add a helper for that)

Install failing with roaming profile, should install to appdata/local rather than appdata/roaming?

Trying to install on Windows 8 64 bit with roaming profiles on a Samba 4 domain server, fails with the messages below. I believe it is because powershell is trying to run scripts from a remote location and the security restrictions didn't allow it.

npm has an issue with a similar problem and a discussion about the differences between appdata/local vs. appdata/roaming.

npm/npm#4564

C:\Windows\system32>cinst boxstarter
Chocolatey (v0.9.8.27) is installing 'boxstarter' and dependencies. By installing you accept the license for 'boxstarter
' and each dependency you are installing.

BoxStarter.Common v2.4.123


    Directory: \\<samba server>\Users\ian\AppData\Roaming


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        11/03/2014     20:22            Boxstarter


    Directory: \\<samba server>\Users\ian\AppData\Roaming\Boxstarter


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        11/03/2014     20:22            BuildPackages
The Boxstarter.Common Module has been copied to \\<samba server>\Users\ian\AppData\Roaming\Boxstarter and added to y
our 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 Boxstarter.Common
PS:>Get-Command -Module Boxstarter.*

To find more info visit http://Boxstarter.org or use:
PS:>Import-Module Boxstarter.Common
PS:>Get-Help Boxstarter
Boxstarter.Common has finished successfully! The chocolatey gods have answered your request!

BoxStarter.WinConfig v2.4.123
The Boxstarter.WinConfig Module has been copied to \\<samba server>\Users\ian\AppData\Roaming\Boxstarter and added t
o 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 Boxstarter.WinConfig
PS:>Get-Command -Module Boxstarter.*

To find more info visit http://Boxstarter.org or use:
PS:>Import-Module Boxstarter.WinConfig
PS:>Get-Help Boxstarter
Boxstarter.WinConfig has finished successfully! The chocolatey gods have answered your request!

boxstarter.bootstrapper v2.4.123
Write-Error : Boxstarter.Bootstrapper did not finish successfully. Boo to the chocolatey gods!
-----------------------
[ERROR] Could not load file or assembly '.\/boxstarter.bootstrapper.psm1' or one of its dependencies. The given assembl
y name or codebase was invalid. (Exception from HRESULT: 0x80131047)
-----------------------
At C:\ProgramData\chocolatey\chocolateyinstall\helpers\functions\Write-ChocolateyFailure.ps1:30 char:3
+   Write-Error $errorMessage
+   ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error

Write-Error : Package 'boxstarter.bootstrapper v2.4.123' did not install successfully: Could not load file or assembly
'.\/boxstarter.bootstrapper.psm1' or one of its dependencies. The given assembly name or codebase was invalid. (Excepti
on from HRESULT: 0x80131047)
At C:\ProgramData\chocolatey\chocolateyinstall\functions\Chocolatey-NuGet.ps1:90 char:17
+                 Write-Error "Package `'$installedPackageName v$installedPackageV ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error


boxstarter.chocolatey v2.4.123
% : The term 'Get-BoxstarterTempDir' is not recognized as the name of a cmdlet, function, script file, or operable prog
ram. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At \\<samba server>\Users\ian\AppData\Roaming\Boxstarter\Boxstarter.Bootstrapper\boxstarter.bootstrapper.psm1:2 cha
r:5
+     % { . $_.ProviderPath }
+     ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-BoxstarterTempDir:String) [ForEach-Object], CommandNotFoundExceptio
   n
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.ForEachObjectCommand

Write-Error : Boxstarter.Chocolatey did not finish successfully. Boo to the chocolatey gods!
-----------------------
[ERROR] Could not load file or assembly '.\/boxstarter.chocolatey.psm1' or one of its dependencies. The given assembly
name or codebase was invalid. (Exception from HRESULT: 0x80131047)
-----------------------
At C:\ProgramData\chocolatey\chocolateyinstall\helpers\functions\Write-ChocolateyFailure.ps1:30 char:3
+   Write-Error $errorMessage
+   ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error

Write-Error : Package 'boxstarter.chocolatey v2.4.123' did not install successfully: Could not load file or assembly '.
\/boxstarter.chocolatey.psm1' or one of its dependencies. The given assembly name or codebase was invalid. (Exception f
rom HRESULT: 0x80131047)
At C:\ProgramData\chocolatey\chocolateyinstall\functions\Chocolatey-NuGet.ps1:90 char:17
+                 Write-Error "Package `'$installedPackageName v$installedPackageV ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error


Boxstarter.HyperV v2.4.123
% : The term 'Get-BoxstarterTempDir' is not recognized as the name of a cmdlet, function, script file, or operable prog
ram. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At \\<samba server>\Users\ian\AppData\Roaming\Boxstarter\Boxstarter.Bootstrapper\boxstarter.bootstrapper.psm1:2 cha
r:5
+     % { . $_.ProviderPath }
+     ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-BoxstarterTempDir:String) [ForEach-Object], CommandNotFoundExceptio
   n
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.ForEachObjectCommand

d----        11/03/2014     20:27            Boxstarter.HyperV
Write-Error : Boxstarter.HyperV did not finish successfully. Boo to the chocolatey gods!
-----------------------
[ERROR] Could not load file or assembly '.\/boxstarter.chocolatey.psm1' or one of its dependencies. The given assembly
name or codebase was invalid. (Exception from HRESULT: 0x80131047)
-----------------------
At C:\ProgramData\chocolatey\chocolateyinstall\helpers\functions\Write-ChocolateyFailure.ps1:30 char:3
+   Write-Error $errorMessage
+   ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error

Write-Error : Package 'Boxstarter.HyperV v2.4.123' did not install successfully: Could not load file or assembly '.\/bo
xstarter.chocolatey.psm1' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from
HRESULT: 0x80131047)
At C:\ProgramData\chocolatey\chocolateyinstall\functions\Chocolatey-NuGet.ps1:90 char:17
+                 Write-Error "Package `'$installedPackageName v$installedPackageV ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error


boxstarter v2.4.123
d----        11/03/2014     20:27            Boxstarter
Boxstarter has finished successfully! The chocolatey gods have answered your request!
To load all Boxstarter Modules immediately, just enter 'BoxstarterShell'.
Interested in Windows Azure VM integration? Run CINST Boxstarter.Azure to install Boxstarter's Azure integration.
Finished installing 'boxstarter' and dependencies - if errors not shown in console, none detected. Check log for errors
if unsure.



C:\Windows\system32>

How to enable cwindowsfeatures for Boxstarter?

I got this error
Write-Error : Package 'temp_BoxstarterPackage v1.0.0' did not install successfu
lly: The term 'cwindowsfeatures' is not recognized as the name of a cmdlet, fun
ction, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again.
At C:\ProgramData\chocolatey\chocolateyinstall\functions\Chocolatey-NuGet.ps1:9
0 char:17

  • ... Write-Error "Package `'$installedPackageName v$installedP ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep
      tion
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
      n,Write-Error

and I think I need to Import-Module in Boxstarter, but did not find how.

Running Package from Boxshare returns cannot find package 'MyTestPackage'

I'm not sure if this should work so apologies if it's not designed to work this way.

I followed the instructions and issued the following command on the hostmachine

Set-BoxstarterShare BoxShare

I got a share and I can see inside the share from a remote machine no problem, there is a buildpackages directory in the shared directory but the config on the host doesn't use this one, it's redirected elsewhere.

I have a package in this LocalRepo called MyTestPackage and commands to build this package from the local machine work as expected.

If I try to run

<hostname>\BoxShare\Boxstarter MyTestPackage

From a remote machine it fails when it gets to the chocolately install complaining that it cannot find my package. Is this because the localrepo config isn't being shared with the remote machine ?

Can I tell the remote running install of BoxStarter to look somewhere else for it's local repo ?

Invoke-BoxstarterBuild does not have a way to add flags for choco pack.

I cannot find a way to pass in parameters to chocolatey such as -NoDefaultExcludes when I run Invoke-BoxstarterBuild from the BoxstarterShell. Is there a recommended way to preconfigure chocolatey or can a new parameter be added to the Invoke-BoxstarterBuild.ps1 to forward parameters?

https://github.com/mwrock/boxstarter/blob/9b8b4abc53df70630171be44e00d9133b8b04527/Boxstarter.Chocolatey/Invoke-BoxstarterBuild.ps1#L45

https://github.com/mwrock/boxstarter/blob/9b8b4abc53df70630171be44e00d9133b8b04527/Boxstarter.Chocolatey/Invoke-BoxstarterBuild.ps1#L56

Autoreboot credentials only asked after first reboot

I have these lines at the beginning of my boxstarter script:

$Boxstarter.RebootOk=$True # Allow reboots?
$Boxstarter.NoPassword=$False # Is this a machine with no login password?
$Boxstarter.AutoLogin=$True # Save my password securely and auto-login after a reboot

But I am only asked for credentials after the machine has already rebooted once. Shouldn't I be asked for those credentials right when I set these settings?

Running script gives "Missing file specification after redirection operator."

This is only my second time using Boxstarter and I'm not totally familiar with the internals, so apologies if I missed something simple (again :))

When running my script via IE and a Gist I get this error:

Missing file specification after redirection operator.

My script is here: https://gist.github.com/tomfulton/11007948

I tried looking for the ChocolateyInstall.ps1 file for the line mentioned below, but I see that temp_BoxstarterPackage doesn't exist in the path mentioned.

Here's the relevant output from the console, apologies for the formatting. I checked Boxstarter's log and don't see any errors.

Your package has been built. Using Boxstarter.bat  or Install-BoxstarterPackage  will run this package.
Boxstarter: Created a temporary package temp_BoxstarterPackage from https://gist.github.com/tomfulton/11007948 in C:\Users\txf1\AppData\Local\Apps\2.0
\6EZG84BB.VC2\MOL08423.TC3\boxs..tion_b971437cd3e1b01e_0002.0004_578c60119a936ded\BuildPackages
Boxstarter starting Calling Chocolatey to install temp_BoxstarterPackage. This may take several minutes to complete...
Chocolatey (v0.9.8.28) is installing 'temp_BoxstarterPackage' and dependencies. By installing you accept the license for 'temp_BoxstarterPackage' and
each dependency you are installing.

temp_BoxstarterPackage v1.0.0
Write-Error : Package 'temp_BoxstarterPackage v1.0.0' did not install successfully: At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:59 char:170 
 ... =off value="" >
                    ~
Missing file specification after redirection operator.
At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:96 char:44
         <span class="datetime">Last active <time datetime="2014-11-13T02:15:05Z" ...
                                            ~
The '<' operator is reserved for future use.
At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:118 char:56
             <span class="octicon octicon-code"></span> <span class="full-word">C ...
                                                        ~
The '<' operator is reserved for future use.
At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:120 char:13
 </a>        </li>
             ~
The '<' operator is reserved for future use.
At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:124 char:64
               <span class="octicon octicon-git-commit"></span> <span class="full ...
                                                                ~
The '<' operator is reserved for future use.
At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:127 char:15
 </a>          </li>
               ~
The '<' operator is reserved for future use.
At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:131 char:58
               <span class="octicon octicon-star"></span> <span class="full-word" ...
                                                          ~
The '<' operator is reserved for future use.
At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:134 char:15
 </a>          </li>
               ~
The '<' operator is reserved for future use.
At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:178 char:10
       or <a href="#" class="js-clone-selector" data-skip-pjax data-protocol="ssh ...
          ~
The '<' operator is reserved for future use.
At C:\ProgramData\chocolatey\lib\temp_BoxstarterPackage.1.0.0\tools\ChocolateyInstall.ps1:185 char:7
 </a>  </div><!-- /.only-with-full-nav -->
       ~
The '<' operator is reserved for future use.
Not all parse errors were reported.  Correct the reported errors and try again.
At C:\ProgramData\chocolatey\chocolateyinstall\functions\Chocolatey-NuGet.ps1:90 char:17
                 Write-Error "Package `'$installedPackageName v$installedPackageV ...
~
     CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
     FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error

Finished installing 'temp_BoxstarterPackage' and dependencies - if errors not shown in console, none detected. Check log for errors if unsure.

If VM has two VHDs, enable-boxstarterVM fails to enable PSremoting

Migrated from https://boxstarter.codeplex.com/workitem/81

If a new VM has been configured with two (or more) VHDs, when Boxtarter is run against teh VM for teh first time, it fails. This happens if Boxstarter needs to mount the VM to enable remoting.

At Line 174 of Enable-BoxstarterVM, it calls Get-VMHarddiskDrive. This will return an array of objects, one for each VHD, and assign it to $vhd. At line 175, $vhd is passed to Enable-BoxstarterVHD as the -path parameter. However, that parameter is typed as [string]. The cmdlet fails with the error message "...Cannot convert value to type System.String..."

Two screen shots attached illustrating this.

Suggest that the fix be

  1. Make Get-VMHarddiskDrive always return an array, even if only one member
  2. set $vhd to the first element of the array returned by Get-VMHarddiskDrive

Thanks for a great package!

autologon fails using 32-bit powershell, succeeds on 64-bit

From https://boxstarter.codeplex.com/workitem/87/edit

Here's a simple Boxstarter script I'm using to test autologin. I save this to my desktop as test.ps1.

if ( Get-UAC )
{
    Disable-UAC
    Invoke-Reboot
}

And here's the code I'm using to run the boxstarter script

Set-ExecutionPolicy Unrestricted -Force
iex ( ( new-object net.webclient ).DownloadString( 'https://chocolatey.org/install.ps1' ) )
cinst Boxstarter
boxstartershell
$creds = Get-Credential
Install-BoxstarterPackage -PackageName "c:\users\YOUR_USER\desktop\test.ps1" -Credential $creds

I'm running this from a clean 64-bit Win 7 SP1 machine with all windows updates already applied.

When I run this using 64-bit Powershell there are no issues. The machine reboots, the auto-login occurs, and boxstarter finishes.

However, when I run this using 32-bit Powershell ("Windows Powershell (x86)"), the machine reboots and then sits at the login screen. I've double-checked that I'm supplying the correct username/password to Get-Credential.

Error from Enable-BoxstarterVM: The VHD does not contain system volume

Greets - brand new to the project as well as Hyper-V in general so I'll be the one making all the noob mistakes public. To wit:

Based on @mwrock's jumpstarter at https://matt-wrock.squarespace.com/?offset=1388363760000

New-VM -Name "myVM" -MemoryStartupBytes 1GB -NewVHDPath "v:\Virtual Hard Disks\w81.vhdx" -NewVHDSizeBytes 60GB
Set-VMDvdDrive -VMName myVM -Path "v:\en_windows_8.1_professional_n_vl_with_update_x64_dvd_4065208.iso"
Start-VM "myVM"

That gives me a functioning windows install. Next I'm wanting to add Chocolatey and BoxStarter. Again from jumpstarter code:

     $cred=Get-Credential BareOS\Steve
     Enable-BoxstarterVM -VMName myVM -Credential $cred

gets me output:

Boxstarter: Configuring local PowerShell Remoting settings...
Boxstarter: Testing remoting access on BareOS...
Boxstarter: Testing WSMAN...
Boxstarter: Testing WMI...
Boxstarter: Stopping myVM
Boxstarter: VHD Dismounted
The VHD does not contain system volume
At C:\[foo]\Boxstarter\Boxstarter.HyperV\Enable-BoxstarterVHD.ps1:78 char:17
+                 throw New-Object -TypeName InvalidOperationException -ArgumentLi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], InvalidOperationException
    + FullyQualifiedErrorId : The VHD does not contain system volume

Perhaps my problem is more Hyper-V related than Boxstarter but since I'm using script that is (implicitly) presented as 'the Boxstarter Way' I'm hoping to invoke to Chocolatey Gods' Goodness.

if (Test-PendingReboot) { Invoke-Reboot } seems to cause failure.

Hi,

I've been promising myself to try out Boxstarter for a while now and it's every bit as good as I imagined.
I seem to get an issue with my script though if I include the following

if (Test-PendingReboot) { Invoke-Reboot }

When it hit's this line it fails with the following:

boxstarter_failure

The worrying this that is doesn't seem to do this consistently though; for instance this section seemed to work:

Install SQL Server 104 Express and Tools

cinst mssql2014express-defaultinstance
cinst MsSqlServerManagementStudio2014Express
if (Test-PendingReboot) { Invoke-Reboot }

But the following section:

Install Visual Studio 2013 Ultimate

cinst VisualStudio2013Ultimate -InstallArguments "/Features:'Blend OfficeDeveloperTools SQL WebTools Win8SDK'"
if (Test-PendingReboot) { Invoke-Reboot }

Fails, this also fails

Update Windows and reboot if necessary

Install-WindowsUpdate -AcceptEula

if (Test-PendingReboot) { Invoke-Reboot }

As an aside I've also had to add a fair few additional steps to my unattend.xml to get WinRM to work which I would be happy to write up but since I was new I thought this might be due to my lack of understanding.

Enable "-force" flag when an array of packages is installed

Migrated from https://boxstarter.codeplex.com/workitem/80

Feature Request: The documentation clearly states that when calling "Install-BoxstarterPackage" and a comma separated list of packages is passed in, it will only install the packages not already present. The documentation also says that when a single package is installed the "-force" flag can be passed to force it's re-installation. I would like to be able to use "-force" on an array of packages.

It would be great if the "-force" flag worked for an array of packages in the re-install logic. Perhaps a different flag should be used since "-force" is also used to suppress prompts.

"If an array of package names are passed to Install-BoxstarterPackage,
Boxstarter will NOT apply the above reinstall logic and will skip the
install for any package that had been previously installed."

Thanks, and keep up the good work.

Controlling the install order of multiple boxstarter packages specified on command line

I was hoping that boxstarter would process the packages I handed it in the order I put them in the array - but it does not seem to be using the order passsed, reverse order or alpha sorted order. I am creating an array and passing it on the command line if that makes any difference to the outcome.

I googled the daylights out of it and couldn't find an answer - so Is there a way to control the order of a list of packages I give it?

If the order cannot be guaranteed, would it be possible to sort the array so that I could at least control order by file naming?

I am also considering manually concatenating the individual box starter scripts and call it as one new script - but it seems like I shouldn't have to do that to support stipulated package ordering.
D.

Running Install-BoxstarterPackage against a remote computer does not allow sourcing a package from a custom NuGet Repo

Migrated from https://boxstarter.codeplex.com/workitem/73

I have my system bootstrap package located in a custom NuGet repo and am running the following command's from my workstation PC against the server I am trying to BootStrap

#################
# Workstation PC
#################

# Set NuGet Repo
Set-BoxStarterConfig -NugetSources "http://www.myget.org/F/MyNugetFeed/api/v2;http://chocolatey.org/api/v2;http://10.4.48.112:8080/nuget/MyRepo"

# Start Remote Install
Install-BoxstarterPackage -ComputerName 10.136.175.171 -Credential $cred -PackageName MyPackageInMyCustomRepo -Verbose

The console then logs the following (I am only showing the important parts)

VERBOSE: [MyServer]Boxstarter: Installing 1 packages from
C:\Users\AdminAccount\AppData\Local\Temp\Boxstarter\BuildPackages;http://chocolatey.org/api/v2;http://www.myget.org/F/boxstarter/api/v2

.
.
.

Chocolatey (v0.9.8.23) is installing 'MyPackageInMyCustomRepo' and dependencies. By installing you accept the license for
'MyPackageInMyCustomRepo ' and each dependency you are installing.
Unable to find package 'MyPackageInMyCustomRepo'.

Command 'install' failed (sometimes this indicates a partial failure). Additional info/packages: MyPackageInMyCustomRepo
VERBOSE: [MyServer]Boxstarter: Exit Code: 1
Chocolatey reported an unsuccessful exit code of 1
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error
    + PSComputerName        : 10.136.175.171

When BoxStarter is doing this remote installation, it creates the temporary directory C:\Users\MyUserName\AppData\Local\Temp\boxstarter on the destination PC. Inside this folder is boxstarter.config. It is using this file to know where its NuGet soruces are. This is where the problem lies.

I tried putting boxstarter.config on the destination server there first with my custom NuGet repo, but when you run the Install-BoxstarterPackage against the remote server, this file is replaced.

I have also tried pre-installing BoxStarter on the destination server and running Set-BoxStarterConfig but when you run Install-BoxstarterPackage it will only look at the configuration from the C:\Users\MyUserName\AppData\Local\Temp\boxstarter folder.

I am not sure if this is by design or not, but if an additional parameter could be added to the Install-BoxstarterPackage function, for example -UseLocalBoxstarterConfig, this would resolve it. I guess the way to implement is, after sending the remote computer the Boxstarter.zip package and extracting it, also sends the workstations boxstarter.config file to the remote machine, so when the remote machine attempts to search for the package, it uses the same sources as the workstation machine.

Boxtarter fails to install when home folder contains non ascii characters.

Hi!
I'm just giving boxstarter a go for the first time and ran into an issue during setup. Right after windows finished installing I went to boxstarter.org and downloaded v2.4.123.
I ran setup.bat, and it failed to install boxstarter.chocolatey with the following message:

Write-Error : Package 'boxstarter.chocolatey v2.4.123' did not install successfully: An object at the specified path C:
\Users\ANDRS~1 does not exist.

My microsoft account created the following user folder c:\Users\Andrés\

Hope this helps!

ps: I attached an output view of the whole error after retrying the install straight from chocolatey

boxstarter error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.