Upgrading old versions to 2022 and migrating data on multiple endpoints

Hi,

Our organization has a dozen or so users that have multiple versions of SketchUp installed. I’m packaging an upgrade to 2022 for them, and I’d like to run my plan by the group to ensure I’m on the right track since I’m new to the SketchUp product.

Since I’m using one script to service multiple endpoints, and any endpoint could have one or more versions installed, I have to do a catch-all search-and-destroy method. Some users have every version from 2017 to 2021 installed. I know each version can stand alone. My plan is to use a batch script to do the following in this order:

  1. Install SU 2022.
  2. Check if an older version is installed. If found, copy files from Components and Materials folders to the SU 2022 program files folder.
  3. Uninstall found version.
  4. Delete the program files folder if it remains after uninstall.

Below is a preliminary version of my install script. Is there any reason to believe this won’t work, or are there any other things I should consider? I appreciate any yay’s, nay’s or whatabout’s anyone can offer.

Thanks, everyone!
Adam

BATCH SCRIPT:

@ECHO OFF
CLS
ECHO SketchUp Pro 2022 Upgrade

:2022
ECHO Installing SketchUp Pro 2022.
SketchUpPro-2022-0.exe /silent

ECHO Migrating data and removing old versions.
:CHECKFOROLD
IF EXISTS "C:\Program Files\SketchUp\SketchUp 2017" GOTO 2017
IF EXISTS "C:\Program Files x86\SketchUp\SketchUp 2017" GOTO 2017
IF EXISTS "C:\Program Files\SketchUp\SketchUp 2018" GOTO 2018
IF EXISTS "C:\Program Files x86\SketchUp\SketchUp 2018" GOTO 2018
IF EXISTS "C:\Program Files\SketchUp\SketchUp 2019" GOTO 2019
IF EXISTS "C:\Program Files x86\SketchUp\SketchUp 2019" GOTO 2019
IF EXISTS "C:\Program Files\SketchUp\SketchUp 2020" GOTO 2020
IF EXISTS "C:\Program Files x86\SketchUp\SketchUp 2020" GOTO 2020
IF EXISTS "C:\Program Files\SketchUp\SketchUp 2021" GOTO 2021
IF EXISTS "C:\Program Files x86\SketchUp\SketchUp 2021" GOTO 2021
EXIT

:2017
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2017\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2017\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2017\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2017\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
wmic product where name ="SketchUp 2017" call uninstall /nointeractive
rd /s /q "C:\Program Files\SketchUp\SketchUp 2017"
rd /s /q "C:\Program Files x86\SketchUp\SketchUp 2017"
GOTO CHECKFOROLD

:2018
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2018\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2018\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2018\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2018\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
wmic product where name ="SketchUp 2018" call uninstall /nointeractive
rd /s /q "C:\Program Files\SketchUp\SketchUp 2018"
rd /s /q "C:\Program Files x86\SketchUp\SketchUp 2018"
GOTO CHECKFOROLD

:2019
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2019\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2019\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2019\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2019\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
wmic product where name ="SketchUp 2019" call uninstall /nointeractive
rd /s /q "C:\Program Files\SketchUp\SketchUp 2019"
rd /s /q "C:\Program Files x86\SketchUp\SketchUp 2019"
GOTO CHECKFOROLD

:2020
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2020\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2020\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2020\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2020\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
wmic product where name ="SketchUp Pro 2020" call uninstall /nointeractive
rd /s /q "C:\Program Files\SketchUp\SketchUp 2020"
rd /s /q "C:\Program Files x86\SketchUp\SketchUp 2020"
GOTO CHECKFOROLD

:2021
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2021\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files\SketchUp\SketchUp 2021\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2021\Components" "C:\Program Files\SketchUp\SketchUp 2022\Components" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
ROBOCOPY "C:\Program Files x86\SketchUp\SketchUp 2021\Materials" "C:\Program Files\SketchUp\SketchUp 2022\Materials" /e /xn /xo /v /log+:"C:\Program Files\SketchUp\2022Upgrade_MaterialsComponentsMigration.log"
wmic product where name ="SketchUp Pro 2021" call uninstall /nointeractive
wmic product where name ="SketchUpPro 2021" call uninstall /nointeractive
rd /s /q "C:\Program Files\SketchUp\SketchUp 2021"
rd /s /q "C:\Program Files x86\SketchUp\SketchUp 2021"
GOTO CHECKFOROLD

1 Like

The program files only hold the shipped materials and they are basically the same for the last 20 years.
If users have made their own collections, they would be in the AppData

1 Like

I believe even AppData makes a folder for each version. So I would need to move those as well, I imagine. Good to know. Thank you!

Would another option be to first copy those files to a temp location, remove 2021, install 2022 fresh, and finally copy those files in place?

I wonder if the uninstall process also deletes the AppData folder… I think I’m going to need to grab both to be safe.

BTW.
:grinning: If I were your user…and you (as IT) run this script on my computer…At least I’ll trip you down in the canteen. :cowboy_hat_face: :wink: :wink:

:peace_symbol:

:sweat_smile: Should I leave all of the old versions installed, and just install 2022 alone? Do you think pulling them off is going to create more of a mess than it’s worth?

Rather drastic, but what has to be taken into consideration is extensions, if the users are running any. Copying them from an older version to the newest may be a recipe for disaster. Some older extensions won’t work in newer versions and may even cause crashes. Your script must absolutely skip at least the extensions that are shipped with SketchUp as version 2022 ships with the newest versions of these.

It might be wisest to do so, unless the users are very short of disk space.

1 Like

Here’s a killer batch file to make all versions go away (2020-2017)

Use at own risk

TASKKILL /F /IM “sketchup.exe”

SET WCV=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield
SET WCV64=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\InstallShield
SET WCVF=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders
SET WGF=%WINDIR%\Installer
SET ISII=%ProgramFiles%\InstallShield Installation Information
SET ISII64=%ProgramFiles(x86)%\InstallShield Installation Information

REM =========================================
REM SketchUp 2020
REM =========================================

REM Uninstall SketchUp Pro 2020 (64-bit) M0:
SET GUID={3018111d-9515-967c-baf8-b63c54330f67}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM Uninstall SketchUp Pro 2020 (64-bit) M0.1:
SET GUID={4c8537c3-c896-1bca-d37f-3a0c4c460134}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM Uninstall SketchUp Pro 2020 (64-bit) M1:
SET GUID={c6e1af14-c4c6-449c-89c9-7728e2743a42}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM Uninstall SketchUp Pro 2020 (64-bit) M1.1:
SET GUID={25d6d668-5a69-6092-7420-4327e8ec78ad}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM =========================================
REM SketchUp 2019
REM =========================================

REM Uninstall SketchUp Pro 2019 (64-bit) M0:
SET GUID={0FB756F3-A84B-E5F8-387F-B9F186E6D497}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM Uninstall SketchUp Pro 2019 (64-bit) M1:
SET GUID={E16DD37C-6FBC-F51F-702E-DD6E92D6ED68}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM Uninstall SketchUp Pro 2019 (64-bit) M2:
SET GUID={06964675-EB01-6D18-6704-429DE73A8319}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM Uninstall SketchUp Pro 2019 (64-bit) M3:
SET GUID={7EDDA955-6D4D-DB6C-C2C3-B757702C0FFE}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM =========================================
REM SketchUp 2018
REM =========================================

REM Uninstall SketchUp Pro 2018 (64-bit) M0:
SET GUID={C702DD60-EBF4-4961-8B7D-F209B361F985}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM =========================================
REM SketchUp 2017
REM =========================================

REM Uninstall SketchUp Pro 2017 (64-bit) M0:
SET GUID={F1E181BD-01D6-4754-92CC-DB8C259B9B28}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM Uninstall SketchUp Pro 2017 (64-bit) M1:
SET GUID={BCA90A4C-9C6A-49D1-91F9-594A0BE02432}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM Uninstall SketchUp Pro 2017 (64-bit) M2:
SET GUID={E59BD84C-169B-4F3F-AC5D-85127CF67051}
if exist %WINDIR%\installer%GUID% msiexec.exe /x %GUID% /quiet && ( reg delete %WCV%_%GUID% /f & reg delete %WCVF% /v C:\Windows\Installer%GUID% /f & rd /s /q “%ISII%%GUID%” & rd /s /q “%WGF%%GUID%” )

REM End Uninstall

It doesn’t take care of preferences and AppData

1 Like

Fortunately, I queried the users, and supposedly none of the use extensions. So I’m disregarding them entirely. It’ll be on them to install what they want in 2022.

I like to keep all version, although lately I don’t use SU in an “average way”.
There is no issue keeping all version installed.