uncler how to continue

Mar 28 at 1:04 PM
Hi,

I try to automate things, and so far I had scripts to run after my install etc, BoxStarter looks like a godsent.

But for me it is being a bit difficult to start using it (I am no admin, but long time developer).

I have this in a gist:
# Basic setup
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
#Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-UAC
Set-TaskbarSmall
# Update Windows and reboot if necessary
Install-WindowsUpdate -AcceptEula
if (Test-PendingReboot) { Invoke-Reboot }
# needed in all cases
cinstm GoogleChrome
I install win7 ultimate 64b in virtualbox, and run this.
  1. first I had issues because I had set no password for my user, so I bit the bullet and set a pwd, and start over
  2. but even with the pwd, something is going wrong. It starts ok, asking me for my pwd, and then starts downloading and installing stuff. But at one point it says something about (sorry did not kept a copy of the messages) continuing after reboot, suppressing reboot. So I enter return and it exists. Nothing else happens, chocolatey is installed, but other things are not done yet (show file extensions, install chrome...) so I guess I have to reboot manually (what did it ask the pwd for then??). I reboot, but nothing new happens.
what did I do wrong? I want this to work so badly... and thank for this tool!!
Editor
Mar 28 at 2:57 PM
Hello,

If I were you, I would change the order of your installation steps slightly.

Firstly, move this:
Install-WindowsUpdate
To be the last step in your script.

Also, there should be no need to do the test for the pending reboot. Boxstarter already handles this, and if it needs to reboot, it will without you explicitly calling it.

Also, just to confirm, is this how you are invoking the package:
$cred = Get-Credential metamana5
Install-BoxstarterPackage -PackageName "<URL to your Gist" -Credential $cred
On a side note, cinstm is actually deprecated in Chocolatey, You should really be using simply cinst, or more correctly choco install (as some of the aliases will be going away soon).

Hope that helps!

Gary
Mar 28 at 5:10 PM
Gary,

this helps, will try on monday at work.

I am starting this in a cmd (normal, no admin):
START http://boxstarter.org/package/nr/url?https://gist.github.com/.../gistfile1.txt
where the url points to my raw gist.

So, what should happpen, automatic restart by itself and would go on installing things specified in the gist right?

thanks.
Editor
Mar 28 at 8:32 PM
Yes, that is certainly the intention.

I think I see the issue. See the nr in the url you are using? That stands for no reboot. Can you remove that part when you try again, and let us know how you got on?

Gary
Mar 28 at 8:37 PM
damn, I got this from http://boxstarter.org/WebLauncher and now that I read more carefully it warns about /nr....my bad.
I will hopefully report a successful install on monday :)

thanks for everything
Coordinator
Mar 29 at 1:48 AM
Ahh that makes total sense then. Gary brings up some really good points but it seemed really off that it was taking your password but still suppressing reboots. One other thing that still seems off but maybe I'm missing something in your post is that boxstarter should not prompt you at all for a password when using /nr/ in the url. Am I understanding correctly that upon launching boxstarter with the /nr/, you were asked for a password?

Thanks!
Mar 29 at 10:11 AM
yes, using the url with /nr/, it asks for the pwd, and then does not reboot.
Mar 31 at 10:38 AM
Edited Mar 31 at 11:41 AM
ok...this is what I did now:

my script is this:
# Basic setup
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
#Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-UAC
Set-TaskbarSmall
 
# needed in all cases
cinstm GoogleChrome
 
# Update Windows and reboot if necessary
Install-WindowsUpdate -AcceptEula
I run it like this (no /nr/ included!):
START http://boxstarter.org/package/url?https://gist.githubusercontent.com/.../boxstarter.base.ps1
When it finishes, it shows this: http://imgur.com/ByjbU7W

I press enter, window closes, and nothing else happens, no reboot. And of course not all has been setup (UAC still on, no extensions...)
Coordinator
Mar 31 at 2:05 PM
By the looks of the image, Boxstarter is not parsing the URL. Is https://gist.githubusercontent.com/.../boxstarter.base.ps1 the literal url you are passing? I'm assuming you added the ellipses just for the sake of reducing the above code example since if that were the literal URL passed, Boxstarter would not be able to resolve it. Do you mind including the exact URL passed to boxstarter?
Mar 31 at 2:11 PM
the url is like this (replacing my username):
https://gist.githubusercontent.com/myusername/5c6934063778705fa81c/raw/a8797b812ac9f7caf66366b067369ecd0c5e7083/boxstarter.base.ps1
i verified I can see it without being logged in to github.
Editor
Mar 31 at 5:51 PM
I think I might know what this is, but it is a complete guess...

Is the Gist private? Could it be the github username and password that is being prompted for?

Gary
Mar 31 at 5:56 PM
Gary,

the gist is private, but as I said, I verified I can hit the url with a new browser, not logged into github.
Editor
Mar 31 at 6:16 PM
Can you try, for the sake of argument, a non private gist? Just to rule out any weirdness with the header being sent with the request.

Gary
Mar 31 at 6:27 PM
sure thing, it's worth discarding for sure. I'll try tomorrow and report back, thanks
Coordinator
Mar 31 at 6:53 PM
I think "secret" gist is the actual term and it just hides the gists from search engines but anyone should be able to reach the link. I'll take a look tonight. I did run into one other person who had a similar issue and we were unfortunately never able to discover why it was that boxstarter was unable to get to the gists. He was on windows 7 and while boxstarter supports windows 7 (at least it does on "my" windows 7 VMs), it would be interesting to try via virtual box which I have not used with boxstarter (I have used virtual box).
Mar 31 at 7:00 PM
is there any test I could run to help troubleshoot this?
Coordinator
Mar 31 at 7:57 PM
If you have access to a non virtual box windows environment, you could create another gist that is safe to run anywhere and see if it runs succesfully. If it does, see if it runs in virtual box. That may help to implicate or exonerate virtual box.

I don't think the actual content of the gist is at all an issue. Because in your image, it says "Installing Chocolatey" which is expected if you passed no packages or url. What you should see is something like: Boxstarter: Installing package https://gist.github.com/mwrock/8622431
Coordinator
Apr 1 at 7:06 AM
Hmm. well virtual box does not appear to be the issue. At least for my environment. Managed to install via boxstarter url just fine on win 7 virtual box vm. Will look at a couple other possibilities.
Apr 1 at 7:19 AM
I'll do a couple of tests in the following hours...
Apr 1 at 9:17 AM
Edited Apr 1 at 9:28 AM
just tested in a much simpler secret gist (in the same w7 virtual box guest):
Set-TaskbarSmall
and now I get in the cmd:
Boxstarter: Installing package https.....

so...no idea why the other gist is not working. Anyway, I am going to start with a new vm, (win7 sp1 instaed win7), so I'll see if I have better luck this time
Apr 1 at 12:17 PM
Edited Apr 1 at 12:17 PM
ok, I think I got it!!

I removed all comments from my secret gist and now it works (at least is says Boxstarter: Installing package https.....). I'll see how it goes.

So it is probably the comments, or maybe the first line must not be a comment??
This is in a w7sp1 guest on virtual box.
Coordinator
Apr 1 at 2:05 PM
weird. Boxstarter has not yet attempted to fetch the url contents at that point where it states the package it is installing. One thing I did not try was non sp1. I loaded up win7 from a win7sp1 ISO.

Anyways, I'm happy that it appears to be working for you now.
Apr 1 at 3:58 PM
yes it is weird, I tried to make sure the 1st line comment was the issue by hitting this gist that worked but adding a comment, from the same machine, but still works...:
#with comment
Set-TaskbarSmall
so no idea wtf is happening. I got gists working from w7 and w7sp1, but in some cases it failed.