title: .Net Framework 4.8 why oh why
body: <p>I'm trying to install the .Net Framework 4.8 using Packer to customize an AWS 2016 Server Base image with a powershell script that is run during the packing process.  However it seems to be a 50/50 chance that the framework will install.  I'm using the following statements in the powershell script and will install without any issues when I do it on the machine as a manual step.</p>
  
  <pre><code>Invoke-WebRequest https://go.microsoft.com/fwlink/?linkid=2088631 -OutFile C:\temp\dotnet.4.8.exe # Download from MS
  Write-Host "Installing 4.8"
  Start-Process C:\temp\dotnet.4.8.exe -ArgumentList "/q /norestart /log c:\temp\" -Wait #Fire a new process to install silently
  Write-Host "Installed 4.8 $LASTEXITCODE"
  </code></pre>
  
  <p>What I'm suspecting is that it isn't even starting as the log file never gets generated and I can verify that it does write the file as when I manually run the commands the file shows up after a few seconds and it continuously written to over the few min period that the installation takes.</p>
  
  <p>I'm seeing no errors in the packer output and no errors being reported in the Event Viewer.
  Packers' output is simply the Installing and Installed write statements.</p>
  
  <p>I have referenced this <a href="https://docs.microsoft.com/en-us/dotnet/framework/deployment/deployment-guide-for-developers#command-line-options" rel="nofollow noreferrer">document from MS</a> as the installer doesn't seem to have an help mode to display what options are available.</p>
  
  <p>Should I be calling the executable differently to guarantee it starts as an unattended install?</p>