File tree 2 files changed +23
-2
lines changed
2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 166
166
</component >
167
167
<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" >
168
168
<RunSynchronous >
169
- <!-- Download and install Cloudbase-Init -->
169
+ <!-- Download Cloudbase-Init -->
170
170
<RunSynchronousCommand wcm : action =" add" >
171
171
<Order >1</Order >
172
172
<Path >powershell -NoLogo -Command "Invoke-WebRequest -Uri http://www.cloudbase.it/downloads/CloudbaseInitSetup_Beta.msi -OutFile C:\Windows\Temp\CloudbaseInitSetup_Beta.msi"</Path >
173
173
<Description >Download Cloudbase-Init Setup</Description >
174
174
</RunSynchronousCommand >
175
+ <!--
175
176
<RunSynchronousCommand wcm:action="add">
176
177
<Order>2</Order>
177
178
<Path>msiexec /i C:\Windows\Temp\CloudbaseInitSetup.msi /qn /l*v C:\Windows\Temp\CloudbaseInitSetup_Beta.log</Path>
178
179
<Description>Execute tools deployment script</Description>
179
180
</RunSynchronousCommand>
181
+ -->
180
182
181
183
<!-- Download and install various utilities -->
182
184
<RunSynchronousCommand wcm : action =" add" >
Original file line number Diff line number Diff line change
1
+ Param (
2
+ [switch ]$InstallCloudbaseInit
3
+ )
1
4
$ErrorActionPreference = " Stop"
2
5
3
6
Get-WUInstall - AcceptAll - IgnoreReboot
9
12
{
10
13
Remove-ItemProperty - Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" - Name Unattend*
11
14
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
+ }
13
32
}
You can’t perform that action at this time.
0 commit comments