File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed
Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -260,31 +260,15 @@ Remove-Item -Path HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\ExperimentEcs -Rec
260260if (-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
You can’t perform that action at this time.
0 commit comments