Added windows-shell provisioning along with inline powershell for choco and some restarts

This commit is contained in:
Nicholas Charron 2016-11-20 11:20:14 -05:00
parent d9d622ed1c
commit 1db87e68d0
4 changed files with 24 additions and 12 deletions

View File

@ -256,7 +256,7 @@
</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 dotNet 4.0 and Chocolatey. This allows the environment to be reloaded after reboot.</Description>
<Description>Install .NET 4.0</Description>
<Order>27</Order>
</SynchronousCommand>
<!-- WITHOUT WINDOWS UPDATES -->

View File

@ -1,14 +1,7 @@
# setup dotnetfx4
$netfx_url = "https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
Write-Output "Downloading $netfx_url"
(New-Object System.Net.WebClient).DownloadFile($netfx_url, "C:\Windows\Temp\dotNetFx40_Full_x86_x64.exe")
Write-Output "Starting Install of dotNetFx40_Full_x86_x64.exe"
Start-Process "C:\Windows\Temp\dotNetFx40_Full_x86_x64.exe" "/q /norestart" -Wait
$ChocoInstallPath = "$env:SystemDrive\ProgramData\Chocolatey\bin"
if (!(Test-Path $ChocoInstallPath)) {
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
}
Start-Process "C:\Windows\Temp\dotNetFx40_Full_x86_x64.exe" "/q /norestart" -Wait

View File

@ -1,4 +1,4 @@
start /w PKGMGR.EXE /iu:SNMP
start /w PKGMGR.EXE /quiet /norestart /iu:SNMP
reg delete HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters\PermittedManagers /va /f
reg add HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters /v EnableAuthenticationTraps /t REG_DWORD /d 0 /f
reg add HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters\ValidCommunities /v public /t REG_DWORD /d 4 /f

View File

@ -103,7 +103,16 @@
"destination": "C:/vagrant"
},
{
"type": "shell",
"type":"powershell",
"inline": [
"iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
]
},
{
"type": "windows-restart"
},
{
"type": "windows-shell",
"remote_path": "C:/Windows/Temp/script.bat",
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
"scripts": [
@ -131,7 +140,17 @@
"scripts/installs/install_openjdk6.bat",
"scripts/installs/setup_jmx.bat",
"scripts/installs/install_ruby.bat",
"scripts/installs/install_devkit.bat",
"scripts/installs/install_devkit.bat"
]
},
{
"type": "windows-restart"
},
{
"type": "windows-shell",
"remote_path": "C:/Windows/Temp/script.bat",
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
"scripts": [
"scripts/installs/install_rails_server.bat",
"scripts/installs/setup_rails_server.bat",
"scripts/installs/install_rails_service.bat",