Skip to content

Commit 91b6dda

Browse files
authored
Update Download.ps1
1 parent 070aa7e commit 91b6dda

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

Download.ps1

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -260,31 +260,15 @@ Remove-Item -Path HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\ExperimentEcs -Rec
260260
if (-not (Test-Path -Path "$PSScriptRoot\setup.exe"))
261261
{
262262
$Parameters = @{
263-
Uri = "https://www.microsoft.com/en-us/download/details.aspx?id=49117"
264-
UseBasicParsing = $true
265-
}
266-
$ODTURL = ((Invoke-WebRequest @Parameters).Links | Where-Object {$_.href -match "officedeploymenttool"}).href
267-
$Parameters = @{
268-
Uri = $ODTURL
269-
OutFile = "$PSScriptRoot\officedeploymenttool.exe"
263+
Uri = "https://officecdn.microsoft.com/pr/wsus/setup.exe"
264+
OutFile = "$PSScriptRoot\setup.exe"
270265
UseBasicParsing = $true
271266
Verbose = $true
272267
}
273268
Invoke-WebRequest @Parameters
274269

275270
# Expand officedeploymenttool.exe
276-
Start-Process "$PSScriptRoot\officedeploymenttool.exe" -ArgumentList "/quiet /extract:`"$PSScriptRoot\officedeploymenttool`"" -Wait
277-
278-
$Parameters = @{
279-
Path = "$PSScriptRoot\officedeploymenttool\setup.exe"
280-
Destination = "$PSScriptRoot"
281-
Force = $true
282-
}
283-
Move-Item @Parameters
284-
285-
Start-Sleep -Seconds 1
286-
287-
Remove-item -Path "$PSScriptRoot\officedeploymenttool", "$PSScriptRoot\officedeploymenttool.exe" -Recurse -Force
271+
# Start-Process "$PSScriptRoot\officedeploymenttool.exe" -ArgumentList "/quiet /extract:`"$PSScriptRoot\officedeploymenttool`"" -Wait
288272
}
289273

290274
# Start downloading to the Office folder

0 commit comments

Comments
 (0)