Packer 0.8.1.

Previously I wrote that the scripts I’m writing, are failing because Packer hangs. Apparently, this was a known issue. And apparently, I was using an older version, 0.7.5. After I updated everything is working wonderfully!!! And for my thanks, here is an updated PowerShell script for provisioning my dotnet stuff. $source = "http://download.microsoft.com/download/1/6/7/167F0D79-9317-48AE-AEDB-17120579F8E2/NDP451-KB2858728-x86-x64-AllOS-ENU.exe" $destination = "C:\Windows\Temp\dotnet.exe" Write-Host 'Starting to download dotnet file.' try { (New-Object System.Net.WebClient).DownloadFile($source, $destination) } catch [Exception] { Write-Host "Exception during download. Probable cause could be that the directory or the file didn't exist." Write-Host '$_.Exception is' $_.Exception } Write-Host 'Download done. Checking if file exists.' if (!(Test-Path $destination)) { Write-Host 'Downloading dotnet Failed!' } else { Write-Host 'Download successful.' } Write-Host 'Starting install process.' try { Start-Process -FilePath $source -ArgumentList "/q /norestart" -Wait -PassThru } catch [Exception] { Write-Host 'Exception during install process.' Write-Host '$_.Exception is' $_.Exception } Write-Host 'All done. Goodbye.' Thanks for reading! ...

July 1, 2015 · 1 min · hannibal

Powershell can also be nice -Or Installing Java silently and waiting

Hello folks. Today, I would like to show you a small script. It installs Java JDK, both version, x86 and 64 bit, silently, and wait for that process to finish. The wait is necessary because /s on a java install has the nasty habit of running in the background. If you are using a .bat file, you shouldn’t, than you would use something like: start /w jdk-setup.exe /s. This gets it done, but is ugly. Also, if you are using Packer and PowerShell provisioning, you might want to set up some environment variables as well for the next script. And you want that property to be available and you don’t want to mess it up with setting a path into a file and then re-setting your path on the begin of your other script. Or pass it around with Packer. No. Use a proper PowerShell script. Learn it. It’s not that hard. Be a professional. Don’t hack something together for the next person to suffer at. ...

June 30, 2015 · 3 min · hannibal

The Packer, The Windows, and the Vagrant box

Hello folks. Today, I would like to write about something close to my heart recently. I’ve been fiddling with Packer, Windows and Vagrant these days. Trying to get a Windows box up in running is a pain in the arse though, so I thought I share my pain with you nice folks out there. Let’s begin. ...

June 27, 2015 · 9 min · hannibal