mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 18:42:35 -05:00
Compare commits
2 Commits
revert-329
...
9061245887
Author | SHA1 | Date | |
---|---|---|---|
9061245887 | |||
841f87564a |
@ -11,18 +11,22 @@ function Invoke-WPFRunAdobeCCCleanerTool {
|
|||||||
Write-Host "The Adobe Creative Cloud Cleaner tool is hosted at"
|
Write-Host "The Adobe Creative Cloud Cleaner tool is hosted at"
|
||||||
Write-Host "$url"
|
Write-Host "$url"
|
||||||
|
|
||||||
# Don't show the progress because it will slow down the download speed
|
try {
|
||||||
$ProgressPreference='SilentlyContinue'
|
# Don't show the progress because it will slow down the download speed
|
||||||
|
$ProgressPreference='SilentlyContinue'
|
||||||
|
|
||||||
Invoke-WebRequest -Uri $url -OutFile "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -UseBasicParsing -ErrorAction SilentlyContinue -Verbose
|
Invoke-WebRequest -Uri $url -OutFile "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -UseBasicParsing -ErrorAction SilentlyContinue -Verbose
|
||||||
|
|
||||||
# Revert back the ProgressPreference variable to the default value since we got the file desired
|
# Revert back the ProgressPreference variable to the default value since we got the file desired
|
||||||
$ProgressPreference='Continue'
|
$ProgressPreference='Continue'
|
||||||
|
|
||||||
Start-Process -FilePath "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Wait -ErrorAction SilentlyContinue -Verbose
|
Start-Process -FilePath "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Wait -ErrorAction SilentlyContinue -Verbose
|
||||||
|
} catch {
|
||||||
if (Test-Path -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe") {
|
Write-Error $_.Exception.Message
|
||||||
Write-Host "Cleaning up..."
|
} finally {
|
||||||
Remove-Item -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Verbose
|
if (Test-Path -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe") {
|
||||||
|
Write-Host "Cleaning up..."
|
||||||
|
Remove-Item -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Verbose
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user