Removed dotnet 4.0 and added WMF to autounattend

This commit is contained in:
Chan9390 2017-07-26 23:47:34 +05:30
parent 415660add5
commit 81571c9ff4
No known key found for this signature in database
GPG Key ID: 6CC28422F21ED4FA
4 changed files with 33 additions and 14 deletions

View File

@ -256,14 +256,14 @@
<Order>26</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\install_netfx.ps1 -AutoStart</CommandLine>
<Description>Install .NET 4.0</Description>
<Order>27</Order>
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\install_dotnet45.ps1 -AutoStart</CommandLine>
<Order>97</Order>
<Description>Install .NET 4.5.1</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\install_dotnet45.ps1 -AutoStart</CommandLine>
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\install_wmf.ps1 -AutoStart</CommandLine>
<Order>98</Order>
<Description>Install .NET 4.5.1</Description>
<Description>Installing Windows Management Framework 5.0</Description>
</SynchronousCommand>
<!--WITHOUT WINDOWS UPDATES -->
<SynchronousCommand wcm:action="add">

View File

@ -1,4 +0,0 @@
chocolatey feature enable -n=allowGlobalConfirmation
choco install powershell
chocolatey feature disable -n=allowGlobalConfirmation
exit

View File

@ -0,0 +1,23 @@
$Logfile = "C:\Windows\Temp\wmf-install.log"
function LogWrite {
Param ([string]$logstring)
$now = Get-Date -format s
Add-Content $Logfile -value "$now $logstring"
Write-Host $logstring
}
LogWrite "Downloading Windows Management Framework 5.0"
try {
(New-Object System.Net.WebClient).DownloadFile('https://download.microsoft.com/download/2/C/6/2C6E1B4A-EBE5-48A6-B225-2D2058A9CEFB/Win7AndW2K8R2-KB3134760-x64.msu', 'C:\Windows\Temp\wmf.msu')
} catch {
LogWrite $_.Exception | Format-List -force
LogWrite "Failed to download file."
}
LogWrite "Starting installation process..."
try {
Start-Process -FilePath "wusa.exe" -ArgumentList "C:\Windows\Temp\wmf.msu /quiet /norestart" -Wait -PassThru
} catch {
LogWrite $_.Exception | Format-List -force
LogWrite "Exception during install process."
}

View File

@ -20,8 +20,8 @@
"./scripts/configs/microsoft-updates.bat",
"./scripts/configs/win-updates.ps1",
"./scripts/installs/openssh.ps1",
"./scripts/installs/install_netfx.ps1",
"./scripts/installs/install_dotnet45.ps1",
"./scripts/installs/install_wmf.ps1",
"./resources/certs/oracle-cert.cer",
"./resources/certs/gdig2.crt",
"./resources/certs/comodorsadomainvalidationsecureserverca.crt",
@ -64,8 +64,8 @@
"./scripts/configs/microsoft-updates.bat",
"./scripts/configs/win-updates.ps1",
"./scripts/installs/openssh.ps1",
"./scripts/installs/install_netfx.ps1",
"./scripts/installs/install_dotnet45.ps1",
"./scripts/installs/install_wmf.ps1",
"./resources/certs/oracle-cert.cer",
"./resources/certs/gdig2.crt",
"./resources/certs/comodorsadomainvalidationsecureserverca.crt",
@ -134,7 +134,8 @@
"type":"powershell",
"inline": [
"iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
]
],
"pause_before": "60s"
},
{
"type": "windows-restart"
@ -150,8 +151,7 @@
"scripts/configs/create_users.bat",
"scripts/installs/setup_iis.bat",
"scripts/installs/setup_ftp_site.bat",
"scripts/chocolatey_installs/java.bat",
"scripts/chocolatey_installs/wmf.bat"
"scripts/chocolatey_installs/java.bat"
]
},
{