boxstarter
boxstarter copied to clipboard
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:\>
Need to support Install-Windows Update outside of a boxstarter run
@pauby - imo there are two possible ways to resolve this..
*1: change the reboot-wrapper for the sched.tasks so it always loads the full boxstarter context before executing anything *2: modify Install-WindowsUpdate so it doesn't rely on any boxstarter functionality.
what'd you suggest we should go for?
I'm inclined to go with 1 primarily because it seems like something you'd want after a reboot anyway?
this might be fixed with Boxstarter v3, I'm moving it to take a look at again in milestone 3.0.1 anyway.