diff --git a/Install-SketchUp.ps1 b/Install-SketchUp.ps1 index 8d89fd5..b076f77 100644 --- a/Install-SketchUp.ps1 +++ b/Install-SketchUp.ps1 @@ -47,6 +47,14 @@ If ( IsAdmin ) Catch { LogErr $_.Exception.Message } } + ## Uninstall SketchUp 2022 + If ( Test-Path "${Env:ProgramFiles}\SketchUp\SketchUp 2022\SketchUp.exe" ) + { + LogMsg "Uninstalling SketchUp 2022" + Try { Start-Process "msiexec.exe" -ArgumentList '/X{898ed298-4bc7-f67e-2e5b-6202a980787a} /qn /norestart' -Wait } + Catch { LogErr $_.Exception.Message } + } + ## Set the local file name to download to $FILE = '{0}{1}.exe' -f (GetTempPath),(Split-Path $URL -Leaf)