File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 166166 </component >
167167 <component name =" Microsoft-Windows-Deployment" processorArchitecture =" amd64" publicKeyToken =" 31bf3856ad364e35" language =" neutral" versionScope =" nonSxS" xmlns : wcm =" http://schemas.microsoft.com/WMIConfig/2002/State" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" >
168168 <RunSynchronous >
169- <!-- Download and install Cloudbase-Init -->
169+ <!-- Download Cloudbase-Init -->
170170 <RunSynchronousCommand wcm : action =" add" >
171171 <Order >1</Order >
172172 <Path >powershell -NoLogo -Command "Invoke-WebRequest -Uri http://www.cloudbase.it/downloads/CloudbaseInitSetup_Beta.msi -OutFile C:\Windows\Temp\CloudbaseInitSetup_Beta.msi"</Path >
173173 <Description >Download Cloudbase-Init Setup</Description >
174174 </RunSynchronousCommand >
175+ <!--
175176 <RunSynchronousCommand wcm:action="add">
176177 <Order>2</Order>
177178 <Path>msiexec /i C:\Windows\Temp\CloudbaseInitSetup.msi /qn /l*v C:\Windows\Temp\CloudbaseInitSetup_Beta.log</Path>
178179 <Description>Execute tools deployment script</Description>
179180 </RunSynchronousCommand>
181+ -->
180182
181183 <!-- Download and install various utilities -->
182184 <RunSynchronousCommand wcm : action =" add" >
Original file line number Diff line number Diff line change 1+ Param (
2+ [switch ]$InstallCloudbaseInit
3+ )
14$ErrorActionPreference = " Stop"
25
36Get-WUInstall - AcceptAll - IgnoreReboot
912{
1013 Remove-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" - Name Unattend*
1114 Remove-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" - Name AutoLogonCount
12- C:\Windows\System32\Sysprep\Sysprep.exe / generalize / oobe / shutdown / unattend:C:\Windows\Temp\Unattend.xml
15+ if ($InstallCloudbaseInit )
16+ {
17+ Invoke-WebRequest - Uri http:// www.cloudbase.it/ downloads/ CloudbaseInitSetup_Beta.msi - OutFile C:\Windows\Temp\CloudbaseInitSetup_Beta.msi
18+ Write-Host " Sleep 60 seconds"
19+ Start-Sleep - s 60
20+ Write-Host " Install Cloudbase-Init"
21+ Start-Process - FilePath msiexec - ArgumentList " /i C:\Windows\Temp\CloudbaseInitSetup.msi /qn /l*v C:\Windows\Temp\CloudbaseInitSetup_Beta.log" - Wait
22+ Write-Host " Sleep 60 seconds take 2"
23+ Start-Sleep - s 60
24+ Write-Host " Install Cloudbase-Init take 2"
25+ Start-Process - FilePath msiexec - ArgumentList " /i C:\Windows\Temp\CloudbaseInitSetup.msi /qn /l*v C:\Windows\Temp\CloudbaseInitSetup_Beta2.log" - Wait
26+ C:\Windows\System32\Sysprep\Sysprep.exe / generalize / oobe / shutdown / unattend:C:\Program\ Files\ (x86)\Cloudbase\ Solutions\Cloudbase- Init\conf\Unattend.xml
27+ }
28+ else
29+ {
30+ C:\Windows\System32\Sysprep\Sysprep.exe / generalize / oobe / shutdown / unattend:C:\Windows\Temp\Unattend.xml
31+ }
1332}
You can’t perform that action at this time.
0 commit comments