1

I have a startup script and I have been testing it on 3 different virtual machines. These machines are running different versions of Windows(7, 8, and 8.1). They all have the same Group Policy applied to them from my domain.

On both the Windows 7 and 8 machines Startup scripts do not seem to hold up the logon process and they run the script in the background while the user is logging on and using the computer. On the Windows 8.1 machine I get a screen that says "Please Wait", this seems to be what shows up while the script runs. I'd like for the Windows 8.1 machine to behave the same as the other two. What am I doing wrong?

Here is the PowerShell script, though I doubt it's the issue:

    if (!(Test-Path -Path "$Env:ALLUSERSPROFILE\chocolatey" )) {

    Write-Host "Choco is not installed, installing now..."
    iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))

} else {

    Write-Host "Choco is already installed, checking for chocolatey updates..."
    iex "$Env:ChocolateyInstall\bin\cup.exe -y"

}

if (!(Test-Path -Path "$Env:ProgramFiles\Puppet Labs\Puppet" )) {

    Write-Host "Puppet is not installed, installing..."
    iex "$Env:ChocolateyInstall\bin\choco.exe install puppet -y -ia PUPPET_MASTER_SERVER=puppetmaster.domain.com"

}
almyz125
  • 111
  • 3
  • I assume that the please wait goes away when the script is done? – Colyn1337 Feb 24 '15 at 17:57
  • Yes, when it is finished it goes away. – almyz125 Feb 24 '15 at 19:46
  • I tried running your script, and it installed chocolatey on a machine that didn't have it, but when I re-ran it, the cup threw an error that it needed a package name. I changed it to iex `"$Env:ChocolateyInstall\bin\cup.exe all -y"` and it worked –  Jun 12 '15 at 16:11
  • You are updating all of the packages installed on the computer with chocolatey when you add 'all' to that command, without the 'all' param it should update Chocolatey itself. [see here](https://github.com/chocolatey/chocolatey/wiki/CommandsUpdate#examples) – almyz125 Jun 16 '15 at 13:19

0 Answers0