Skip to content

Commit

Permalink
Moved the steps around
Browse files Browse the repository at this point in the history
  • Loading branch information
oaltawil committed Aug 17, 2021
1 parent cef0a33 commit 020ef53
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 75 deletions.
2 changes: 1 addition & 1 deletion Configure-AzureVMImageBuilder.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $location="eastus"
$runOutputName="aibCustomWindows7Image"

# Image template name
$imageTemplateName="aibCustomWindows7ImageTemplateVer5"
$imageTemplateName="aibCustomWindows7ImageTemplateVer8"

# The Image Template File Name
$templateFilePath = "armTemplateWinSIG_New.json"
Expand Down
144 changes: 70 additions & 74 deletions armTemplateWinSIG_New.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,48 +78,6 @@
"destination":"C:\\BuildArtifacts\\SecurityUpdates\\Win7AndW2K8R2-KB3191566-x64.zip"
},

{
"type": "PowerShell",
"name": "Download-FSLogixApps",
"inline": [
"Write-Output 'Downloading FSLogix Apps.'",
"$DownloadUri = 'https://aka.ms/fslogix/download'",
"$DestinationFilePath = 'C:\\BuildArtifacts\\Applications\\FSLogixApps.zip'",
"$WebRequest = New-Object -Typename System.Net.WebClient",
"$WebRequest.DownloadFile($DownloadUri, $DestinationFilePath)"
],
"runAsSystem": false,
"runElevated": false
},

{
"type": "File",
"name": "Download-MicrosoftEdge",
"sourceUri": "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/fbfdb4b9-1af5-4723-a7bc-4dac657f228c/MicrosoftEdgeEnterpriseX64.msi",
"destination":"C:\\BuildArtifacts\\Applications\\MicrosoftEdgeEnterpriseX64.msi"
},

{
"type": "File",
"name": "Download-MicrosoftEdgeSetup",
"sourceUri": "https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?platform=Default&source=EdgeStablePage&Channel=Stable&language=en&consent=1",
"destination":"C:\\BuildArtifacts\\Applications\\MicrosoftEdgeSetup.exe"
},

{
"type": "PowerShell",
"name": "Download-VSCode",
"inline": [
"Write-Output 'Downloading Visual Studio Code.'",
"$DownloadUri = 'https://update.code.visualstudio.com/latest/win32-x64/stable'",
"$DestinationFilePath = 'C:\\BuildArtifacts\\Applications\\VSCodeSetup-x64.exe'",
"$WebRequest = New-Object -Typename System.Net.WebClient",
"$WebRequest.DownloadFile($DownloadUri, $DestinationFilePath)"
],
"runAsSystem": false,
"runElevated": false
},

{
"type": "PowerShell",
"name": "Expand-KB3191566-WMF5.1",
Expand All @@ -137,32 +95,6 @@
"runElevated": false
},

{
"type": "PowerShell",
"name": "Expand-FSLogixApps",
"inline": [
"Write-Output 'Expanding FSLogixApps.zip.'",
"$ZipFilePath = 'C:\\BuildArtifacts\\Applications\\FSLogixApps.zip'",
"$DestinationFolderPath = 'C:\\BuildArtifacts\\Applications'",
"$ShellObject = New-Object -ComObject Shell.Application",
"$ZipFileContents = $ShellObject.NameSpace($ZipFilePath).Items()",
"$FolderObject = $ShellObject.NameSpace($DestinationFolderPath)",
"$FolderObject.CopyHere($ZipFileContents, 20)",
"Get-Item -Path C:\\BuildArtifacts\\Applications\\x64\\Release\\FSLogixAppsSetup.exe"
],
"runAsSystem": false,
"runElevated": false,
"pause_before": "30s"
},

{
"type": "PowerShell",
"name": "Enable-TLS1.2",
"scriptUri": "https://raw.githubusercontent.com/oaltawil/wvd7/main/Enable-TLS12.ps1",
"runAsSystem": false,
"runElevated": true
},

{
"type": "PowerShell",
"name": "Install-KB2592687-RDP8.0",
Expand Down Expand Up @@ -205,15 +137,66 @@

{
"type": "PowerShell",
"name": "Install-FSLogixApps",
"name": "Enable-TLS1.2",
"scriptUri": "https://raw.githubusercontent.com/oaltawil/wvd7/main/Enable-TLS12.ps1",
"runAsSystem": false,
"runElevated": true
},

{
"type": "WindowsRestart",
"name": "Restart-Computer",
"restartCheckCommand": "echo Azure-Image-Builder-Restarted-the-VM > c:\\BuildArtifacts\\azureImageBuilderRestart.txt",
"restartTimeout": "15m"
},

{
"type": "File",
"name": "Download-MicrosoftEdge",
"sourceUri": "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/fbfdb4b9-1af5-4723-a7bc-4dac657f228c/MicrosoftEdgeEnterpriseX64.msi",
"destination":"C:\\BuildArtifacts\\Applications\\MicrosoftEdgeEnterpriseX64.msi"
},

{
"type": "PowerShell",
"name": "Download-VSCode",
"inline": [
"Write-Output 'Installing FSLogixApps.'",
"Get-Item -Path C:\\BuildArtifacts\\Applications\\x64\\Release\\FSLogixAppsSetup.exe",
"$Process = Start-Process -Wait -NoNewWindow -PassThru -FilePath C:\\BuildArtifacts\\Applications\\x64\\Release\\FSLogixAppsSetup.exe -ArgumentList /install, /quiet, /norestart",
"return $Process.ExitCode"
"Write-Output 'Downloading Visual Studio Code.'",
"$DownloadUri = 'https://update.code.visualstudio.com/latest/win32-x64/stable'",
"$DestinationFilePath = 'C:\\BuildArtifacts\\Applications\\VSCodeSetup-x64.exe'",
"Invoke-WebRequest -UseBasicParsing -Uri $DownloadUri -OutFile $DestinationFilePath",
"Get-Item -Path $DestinationFilePath"
],
"runAsSystem": false,
"runElevated": true
"runElevated": false
},

{
"type": "PowerShell",
"name": "Download-FSLogixApps",
"inline": [
"Write-Output 'Downloading FSLogix Apps.'",
"$DownloadUri = 'https://aka.ms/fslogix/download'",
"$DestinationFilePath = 'C:\\BuildArtifacts\\Applications\\FSLogixApps.zip'",
"Invoke-WebRequest -UseBasicParsing -Uri $DownloadUri -OutFile $DestinationFilePath",
"Get-Item -Path $DestinationFilePath"
],
"runAsSystem": false,
"runElevated": false
},

{
"type": "PowerShell",
"name": "Expand-FSLogixApps",
"inline": [
"Write-Output 'Expanding FSLogixApps.zip.'",
"$ZipFilePath = 'C:\\BuildArtifacts\\Applications\\FSLogixApps.zip'",
"$DestinationFolderPath = 'C:\\BuildArtifacts\\Applications'",
"Expand-Archive -Path $ZipFilePath -DestinationPath $DestinationFolderPath -Force",
"Get-Item -Path C:\\BuildArtifacts\\Applications\\x64\\Release\\FSLogixAppsSetup.exe"
],
"runAsSystem": false,
"runElevated": false
},

{
Expand Down Expand Up @@ -243,6 +226,19 @@
"runElevated": true
},

{
"type": "PowerShell",
"name": "Install-FSLogixApps",
"inline": [
"Write-Output 'Installing FSLogixApps.'",
"Get-Item -Path C:\\BuildArtifacts\\Applications\\x64\\Release\\FSLogixAppsSetup.exe",
"$Process = Start-Process -Wait -NoNewWindow -PassThru -FilePath C:\\BuildArtifacts\\Applications\\x64\\Release\\FSLogixAppsSetup.exe -ArgumentList /install, /quiet, /norestart",
"return $Process.ExitCode"
],
"runAsSystem": false,
"runElevated": true
},

{
"type": "WindowsUpdate",
"name": "Install-FrenchLanguagePack",
Expand Down

0 comments on commit 020ef53

Please sign in to comment.