Boxstarter keeps auto logging in

Apr 29, 2014 at 11:54 PM
Edited Apr 29, 2014 at 11:57 PM
I'm running Windows 7 Enterprise. I'm running Boxstarter from the web, starting from PowerShell, pointing to a script on my local network like this:

START http://boxstarter.org/package/nr/url?\\SomeServer\SomeDir\Setup-Script.ps1

There's nothing that requires a reboot and I'm not asking for one in the code. but now most times when I restart my computer it auto logs in as me. How can I make that stop?

Also, how can I uninstall Boxstarter? I can't seem to find that on the site.

Thanks,
Scott
Coordinator
Apr 30, 2014 at 5:52 AM
I have seen this happen before but am unable to reproduce. My suspicion is that it is caused by forcibly exiting the boxstarter process via ctrl+C or killing the process before Boxstarter has a chance to reset the logon. You can manually fix this with:
$winLogonKey="HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
$winlogonProps = Get-ItemProperty -Path $winLogonKey
if($winlogonProps.DefaultUserName){Remove-ItemProperty -Path $winLogonKey -Name "DefaultUserName" -ErrorAction SilentlyContinue}
if($winlogonProps.DefaultDomainName){Remove-ItemProperty -Path $winLogonKey -Name "DefaultDomainName" -ErrorAction SilentlyContinue}
if($winlogonProps.DefaultPassword){Remove-ItemProperty -Path $winLogonKey -Name "DefaultPassword" -ErrorAction SilentlyContinue}
if($winlogonProps.AutoAdminLogon){Remove-ItemProperty -Path $winLogonKey -Name "AutoAdminLogon" -ErrorAction SilentlyContinue}
Regarding uninstalling Boxstarter, Boxstarter is simply a collection of scripts that sit on your disk and do not do anythin unless explicitly invoked via powershell or the click once app so uninstalling is just a matter of deleting the files. You can delete them by finding the directory under %LocalAppData%\Apps\2.0 than hold the Boxstarter.* module directories. Windows will remove these files after a certain period since Boxstarter installs them as a temporary app.
Apr 30, 2014 at 4:33 PM
Thank Matt. I don't know if I killed the script as it was running, I may have. I am sure it crashed at least once, don't know if that may have the same effect. I'll keep that in mind as I continue to work on it and let you know if I see any correlations.

I knew where the scripts were, just wasn't sure if there was anything else. Thanks again.

Scott
May 2, 2014 at 5:02 PM
I'm seeing something similar. BoxStarter ran to completion with multiple restarts, but has never quite cleaned up after itself. One thing that might help explain things in my case is that I have subsequently re-run the same BoxStarter script in order to update some components that have new versions. On these additional runs, however, it never gets any further than Chocolatey itself. It doesn't error out. It just seems to decide that there's nothing to do, and bails.
Coordinator
May 3, 2014 at 3:59 AM
Hi MelGrubb,

Does your system also automatically log you in after running Boxstarter?

One thing to be aware of is that chocolatey packages installed in a Boxstarter package will not attempt to update themselves on subsequent runs. Instead, Chocolatey identifies that they have been installed and therefore skips over them.

The best way to Update them is to run
CUP ALL
This will update all installed chocolatey packages.
May 3, 2014 at 4:07 AM
Yes, its automatically logging in.

As for chocolate’s behavior. I am used to seeing the whole script run through, top to bottom, even if everything is up to date. For each item, you normally see the message in pink saying that a particular component is already installed.

What I'm now seeing on this particular machine is a lack of interest in even trying to install anything other than chocolatey itself and calling it a day. I'll try to get a screenshot next week.

Coordinator
May 3, 2014 at 4:48 AM
oh ok. That is definitely not the desired behavior. Also helpful would be the log file in %ocalappdata%/Boxstarter/Boxstarter.log and the Boxstarter package script.
May 5, 2014 at 2:59 PM
The script I'm running is here: https://gist.github.com/MelGrubb/3bddb0611bc8e4556b80
The output is below, since CodePlex won't let me attach an image without hosting it somewhere else first.
Also attached below that is the contents of the log file. I hope this helps.

CONSOLE OUTPUT
Boxstarter: Installing package https://gist.githubusercontent.com/MelGrubb/3bddb
0611bc8e4556b80/raw
Boxstarter Version 2.4.15
(c) 2014 Matt Wrock. http://boxstarter.org

Please type CTRL+C or close this window to exit Boxstarter if you do not want to
risk a reboot during this Boxstarter install.

Boxstarter may need to reboot your system.
Please provide your password so that Boxstarter may automatically log you on.
Your password will be securely stored and encrypted.
Autologon Password: ***********
Boxstarter: Successfully authenticated password.
Boxstarter: Disabling Automatic Updates from Windows Update
Boxstarter: Stopping Configuration Manager
Using this proxyserver: proxy01:8080
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\ex_mgrubb\AppData\Local\Apps\2.0\D13B641P
.TON\BEJ52TOJ.5M2\boxs..tion_9b0d113b5eadff54_0002.0004_d3164dcc60997d3b\BuildPa
ckages\temp_BoxstarterPackage.1.0.0.nupkg'.

Boxstarter: Created a temporary package temp_BoxstarterPackage from https://gist .githubusercontent.com/MelGrubb/3bddb0611bc8e4556b80/raw in C:\Users\ex_mgrubb\A
ppData\Local\Apps\2.0\D13B641P.TON\BEJ52TOJ.5M2\boxs..tion_9b0d113b5eadff54_0002
.0004_d3164dcc60997d3b\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.6779874
    Boxstarter: Enabling Automatic Updates from Windows Update
    Boxstarter: Starting Configuration Manager Service
    Type ENTER to exit:
LOG FILE
[2014-05-05T10:56:05.7027676-04:00:::PID 11132] Boxstarter: Installing package https://gist.githubusercontent.com/MelGrubb/3bddb0611bc8e4556b80/raw.
[2014-05-05T10:56:05.7117676-04:00:::PID 11132] Boxstarter: Installing package https://gist.githubusercontent.com/MelGrubb/3bddb0611bc8e4556b80/raw.
[2014-05-05T10:56:05.7327676-04:00:::PID 11132] Boxstarter Version 2.4.15
[2014-05-05T10:56:05.7347676-04:00:::PID 11132] Boxstarter Version 2.4.15
[2014-05-05T10:56:05.7377676-04:00:::PID 11132] (c) 2014 Matt Wrock. http://boxstarter.org

[2014-05-05T10:56:05.7387676-04:00:::PID 11132] (c) 2014 Matt Wrock. http://boxstarter.org

[2014-05-05T10:56:05.7447676-04:00:::PID 11132] + Boxstarter starting Installation session.
[2014-05-05T10:56:05.7477676-04:00:::PID 11132] Boxstarter: NoPassword is false checking autologin
[2014-05-05T10:56:05.7527676-04:00:::PID 11132] Boxstarter: AutoLogin status is False
[2014-05-05T10:56:05.7547676-04:00:::PID 11132] Please type CTRL+C or close this window to exit Boxstarter if you do not want to risk a reboot during this Boxstarter install.

[2014-05-05T10:56:05.7557676-04:00:::PID 11132] Please type CTRL+C or close this window to exit Boxstarter if you do not want to risk a reboot during this Boxstarter install.

[2014-05-05T10:56:05.7587676-04:00:::PID 11132] Boxstarter may need to reboot your system.
Please provide your password so that Boxstarter may automatically log you on.
Your password will be securely stored and encrypted.
[2014-05-05T10:56:05.7597676-04:00:::PID 11132] Boxstarter may need to reboot your system.
Please provide your password so that Boxstarter may automatically log you on.
Your password will be securely stored and encrypted.
[2014-05-05T10:56:13.9157676-04:00:::PID 11132] Boxstarter: Successfully authenticated password.
[2014-05-05T10:56:13.9177676-04:00:::PID 11132] Boxstarter: Successfully authenticated password.
[2014-05-05T10:56:13.9217676-04:00:::PID 11132] Boxstarter: NoPassword is set to False and RebootOk is set to True and the NoPassword parameter passed was False
[2014-05-05T10:56:13.9247676-04:00:::PID 11132] Boxstarter: Disabling Automatic Updates from Windows Update
[2014-05-05T10:56:13.9267676-04:00:::PID 11132] Boxstarter: Disabling Automatic Updates from Windows Update
[2014-05-05T10:56:14.3507676-04:00:::PID 11132] Boxstarter: Stopping Configuration Manager
[2014-05-05T10:56:14.3537676-04:00:::PID 11132] Boxstarter: Stopping Configuration Manager
[2014-05-05T10:56:15.0277676-04:00:::PID 11132] Boxstarter: LocalRepo is at C:\Users\ex_mgrubb\AppData\Local\Apps\2.0\D13B641P.TON\BEJ52TOJ.5M2\boxs..tion_9b0d113b5eadff54_0002.0004_d3164dcc60997d3b\BuildPackages
[2014-05-05T10:56:15.0627676-04:00:::PID 11132] Boxstarter: Chocolatey installed, setting up interception of Chocolatey methods.
[2014-05-05T10:56:15.2617676-04:00:::PID 11132] Using this proxyserver: proxy01:8080
[2014-05-05T10:56:15.9307676-04:00:::PID 11132] Boxstarter: Nuget.exe result: Created 'temp_BoxstarterPackage.nuspec' successfully.
[2014-05-05T10:56:15.9337676-04:00:::PID 11132] Boxstarter: Attempt #1...
[2014-05-05T10:56:15.9637676-04:00:::PID 11132] Boxstarter: Searching for temp_BoxstarterPackage\temp_BoxstarterPackage.nuspec
[2014-05-05T10:56:16.0667676-04:00:::PID 11132] Calling 'C:\Chocolatey\chocolateyinstall\nuget.exe pack temp_BoxstarterPackage\temp_BoxstarterPackage.nuspec -NoPackageAnalysis'.
[2014-05-05T10:56:16.3317676-04:00:::PID 11132] Attempting to build package from 'temp_BoxstarterPackage.nuspec'.
[2014-05-05T10:56:16.3667676-04:00:::PID 11132] Successfully created package 'C:\Users\ex_mgrubb\AppData\Local\Apps\2.0\D13B641P.TON\BEJ52TOJ.5M2\boxs..tion_9b0d113b5eadff54_0002.0004_d3164dcc60997d3b\BuildPackages\temp_BoxstarterPackage.1.0.0.nupkg'.
[2014-05-05T10:56:16.3837676-04:00:::PID 11132]
[2014-05-05T10:56:16.3997676-04:00:::PID 11132] Boxstarter: Created a temporary package temp_BoxstarterPackage from https://gist.githubusercontent.com/MelGrubb/3bddb0611bc8e4556b80/raw. in C:\Users\ex_mgrubb\AppData\Local\Apps\2.0\D13B641P.TON\BEJ52TOJ.5M2\boxs..tion_9b0d113b5eadff54_0002.0004_d3164dcc60997d3b\BuildPackages
[2014-05-05T10:56:16.4017676-04:00:::PID 11132] Boxstarter: Created a temporary package temp_BoxstarterPackage from https://gist.githubusercontent.com/MelGrubb/3bddb0611bc8e4556b80/raw. in C:\Users\ex_mgrubb\AppData\Local\Apps\2.0\D13B641P.TON\BEJ52TOJ.5M2\boxs..tion_9b0d113b5eadff54_0002.0004_d3164dcc60997d3b\BuildPackages
[2014-05-05T10:56:16.4197676-04:00:::PID 11132] Boxstarter: Installing 2 packages from C:\Users\ex_mgrubb\AppData\Local\Apps\2.0\D13B641P.TON\BEJ52TOJ.5M2\boxs..tion_9b0d113b5eadff54_0002.0004_d3164dcc60997d3b\BuildPackages;http://chocolatey.org/api/v2;http://www.myget.org/F/boxstarter/api/v2
[2014-05-05T10:56:16.4247676-04:00:::PID 11132] Boxstarter: Installing 1 packages
[2014-05-05T10:56:16.4267676-04:00:::PID 11132] Boxstarter: Checking for Pending reboot
[2014-05-05T10:56:16.4967676-04:00:::PID 11132] + Boxstarter starting Calling Chocolatey to install temp_BoxstarterPackage. This may take several minutes to complete...
[2014-05-05T10:56:16.4977676-04:00:::PID 11132] + Boxstarter starting Calling Chocolatey to install temp_BoxstarterPackage. This may take several minutes to complete...
[2014-05-05T10:56:16.6227676-04:00:::PID 11132] Chocolatey (v0.9.8.23) is installing 'temp_BoxstarterPackage' and dependencies. By installing you accept the license for 'temp_BoxstarterPackage' and each dependency you are installing.
[2014-05-05T10:56:17.8347676-04:00:::PID 11132] 'temp_BoxstarterPackage 1.0.0' already installed.

[2014-05-05T10:56:17.8517676-04:00:::PID 11132] If you want to reinstall the current version of an existing package, please use the -force command.
[2014-05-05T10:56:17.8677676-04:00:::PID 11132]
[2014-05-05T10:56:17.9217676-04:00:::PID 11132] Finished installing 'temp_BoxstarterPackage' and dependencies - if errors not shown in console, none detected. Check log for errors if unsure.
[2014-05-05T10:56:17.9377676-04:00:::PID 11132] Boxstarter: Exit Code: 0
[2014-05-05T10:56:17.9407676-04:00:::PID 11132] + Boxstarter finished Calling Chocolatey to install temp_BoxstarterPackage. This may take several minutes to complete... 00:00:01.4441545
[2014-05-05T10:56:17.9417676-04:00:::PID 11132] + Boxstarter finished Calling Chocolatey to install temp_BoxstarterPackage. This may take several minutes to complete... 00:00:01.4441545
[2014-05-05T10:56:17.9587676-04:00:::PID 11132] Boxstarter: Enabling Automatic Updates from Windows Update
[2014-05-05T10:56:17.9597676-04:00:::PID 11132] Boxstarter: Enabling Automatic Updates from Windows Update
[2014-05-05T10:56:17.9847676-04:00:::PID 11132] Boxstarter: Starting Configuration Manager Service
[2014-05-05T10:56:17.9857676-04:00:::PID 11132] Boxstarter: Starting Configuration Manager Service
[2014-05-05T10:56:18.7287676-04:00:::PID 11132] Boxstarter: Cleaning up and not rebooting
[2014-05-05T10:56:18.7307676-04:00:::PID 11132] Boxstarter: Cleaning up autologon registry keys
May 5, 2014 at 5:25 PM
Edited May 5, 2014 at 5:29 PM
I saw something similar to this. So Boxstarter would fire up, check that it was installed and chocolatey was installed, then shut down. When I ran the script on its own I saw the error. Once that was corrected it ran just fine.

The script had a '#Requires -version 3' in it as one of the first lines, the machine only had PS v2 installed. For some reason, it ran through the whole script the first time and installed all but one piece of software. One install had an error. I corrected that line in the script and re-ran, only to see Boxstarter do its thing and then leave without running the script. I installed PS 3 and it ran as expected.

So it appears that it ignored the #Requires -version 3 on the first run but took it to heart on the subsequent runs. Weird.

Scott