Jump to content
  • Vectorworks Updater Command Line Guide


    jblock

    Updated 3/19/2020, 7/10/2023, 10/16/2023

     

    The Vectorworks Updater can be used in two modes: GUI mode and CLI mode. GUI mode is what most users use and guides them through any updates or other operations via buttons, menus, and other visual elements. 

    The CLI performs the same functions as the GUI but via the command line. 

    On Windows, this must be done in an administrator command prompt.

     

    The CLI is accessed through calling a script file instead of the main exe/app of the Updater. You can have it show help by: 

     

    Windows: "c:\Program Files\Vectorworks 2024\Vectorworks 2024 Updater\resources\cli.bat" -h 

     

    macOS: /Applications/Vectorworks\ 2024/Vectorworks\ 2024\ Updater.app/Contents/Resources/cli.sh -h 

     

    On both platforms, the help command prints the usage help: 

     

    Screen Shot 2021-03-24 at 5.11.51 PM.png

     

    For help on a specific command, you can use the arguments -h <command>, such as: 

     

    Windows: "c:\Program Files\Vectorworks 2024\Vectorworks 2024 Updater\resources\cli.bat" check -h 

     

    macOS: /Applications/Vectorworks\ 2024/Vectorworks\ 2024\ Updater.app/Contents/Resources/cli.sh check -h 

     

    In the above usage, arguments in angled brackets are required positional arguments. Arguments in square brackets are options.

     

    Here is a quick description of the commands: 

     

    • check: Prints out information in JSON format regarding any available updates. This is how Vectorworks itself calls the updater periodically to check for updates and displays the dialog with information about the update when one is available.
      • For example: cli.bat check
    • check-simple: prints out 0 or 1 based on if an update is available or not.
      • For example: cli.bat check-simple
    • repair: Runs a repair operation. A repair checks that every file that’s supposed to be installed is present and valid. Fixes any problems that it finds. This has an option --ldf where you can supply an LDF file if needed.
      • For example: cli.bat repair  
    • download-generic-update: Downloads a .vwupdate file that can be used to update any earlier update of Vectorworks while offline or on multiple machines. Note that the --platform/-p option is required and that the destination provided should be a folder (inside which a .vwupdate file will be created).
      • For example: cli.bat download-generic-update c:\DownloadedGenericUpdate Update3 -p w
      • This will create c:\DownloadedGenericUpdate\generic-Update3-win32.vwupdate
    • download-update: Downloads a more specific (and sometimes smaller) .vwupdate file that can be used to update Vectorworks from a specific version to a specific version. Note that the --platform/-p option is required and that the destination provided should be a folder (inside which a .vwupdate file will be created).
      • For example: cli.bat download-update c:\DownloadedGenericUpdate Update1 Update3 -p w
      • This will create c:\DownloadedGenericUpdate\Update1-Update3-win32.vwupdate
    • update: Updates Vectorworks. Used to do a normal update, or use a .vwupdate file with the –input option. 
      • For example: cli.bat update
    • download-latest-updater: This can be used to download an updated Vectorworks Updater package. This is done automatically at startup in the GUI. Note that the --platform/-p option is required and that the destination provided should be a folder (inside which a .vwupdate file will be created).
      • For example: cli.bat download-generic-updater c:\DownloadedUpdater -p w
      • This will create the file c:\DownloadedUpdater\Vectorworks <version> Updater-<Version>-win-installer.exe that you can use to install the latest Updater version.

     

    For any of these commands there is further help if you append -h to the command as in: 

     

    Windows: "c:\Program Files\Vectorworks 2024\Vectorworks 2024 Updater\resources\cli.bat" check -h 

     

    macOS: /Applications/Vectorworks\ 2024/Vectorworks\ 2024\ Updater.app/Contents/Resources/cli.sh check -h 

     

    Special Note for macOS:

    In recent versions of macOS, Terminal by default cannot modify Application bundles under /Applications that have been launched at least once. Since the updater CLI is usually invoked from Terminal, the updater will also be unable to modify these files. This will manifest as an error in the updater log that looks like:

    [2024-01-29T18:26:44.732Z] - info: changeFile() - issue (EPERM).

     

    Further log analysis would show that the file being modified is inside the Vectorworks app bundle, Package manager app bundle, or similar. There are two solutions for this:

    1. Grant Terminal full disk access. In System Settings -> Privacy & Security -> Full Disk Access, click the "+" and select it from /Applications/Utilities/Terminal.app. It will then be in the main list, and the switch must be turned on. Note that this cannot be done via command line.
    2. Instead of the "cli.sh" launch method above, use:
      export UPDATER_BUNDLE_DIR="/Applications/Vectorworks 2024/Vectorworks 2024 Updater.app"
      open "$UPDATER_BUNDLE_DIR" --env ELECTRON_RUN_AS_NODE=1 --env UPDATER_CLI_PROD=1 --args "$UPDATER_BUNDLE_DIR/Contents/Resources/cli.js" check

       

      1. This causes the system to not treat the updater like a script and thus lets it modify these files. You will not get stdout from the app, but the log file will be created as normal.
      2. The above command demonstrates the "check" command, but you can change the arguments to what you need (for example "update", "repair", etc).
      3. You may need to modify "UPDATER_BUNDLE_DIR" above to where your updater can be found, or substitute it directly in the open command.

     

     

    Known Issues: 

    1) The updater may complain about not finding “CommonDir” on Windows. It will show an error such as: 

     

    Could not find a path for the update location 'commonDir'. To correct this please run this again with the arguments -L commonDir:<path> with <path> being the correct directory, or contact support 

     

    In this case, you can supply commonDir as follows: 

     

    "c:\Program Files\Vectorworks 2024\Vectorworks 2024 Updater\resources\cli.bat" -L "commonDir:\Program Files\Common Files" -h 

     

    Please note the quotes (due to spaces in the path) and don't forget them in your path arguments in these commands if necessary.



      Report Article



    User Feedback


     

    In Vectorworks 2023, it was not possible to use the Updater; now, in 2024, I only encountered a minor error, as it searches for curl.exe directly in the Program Files. The option that existed up to version 2019 with "update-updater" was also much more practical to keep inside a BAT file in the Schedule. For 2024, I am using this code:
     

    @echo off
    SET updateFolder=C:\Batch\Vectorworks\Update
    SET vectorworksPath=C:\Program Files\Vectorworks 2024\Vectorworks 2024 Updater
    SET CLIBAT=%vectorworksPath%\resources\cli.bat
    SET CURLEXE=%vectorworksPath%\resources\curl.exe

    REM Check if the update folder exists
    IF NOT EXIST "%updateFolder%" (
        MKDIR "%updateFolder%"
    )

    REM Run the program to download the latest updater
    CALL "%exePath%" download-latest-updater "%updateFolder%" -p w

    REM Find the downloaded .exe file and execute it
    FOR %%I IN ("%updateFolder%\*.exe") DO (
        "%%I" /S -INSTDIR "%vectorworksPath%"
    )

    REM Copy curl.exe to the specified location without prompting
    COPY /Y "%CURLEXE%" "C:\Program Files\curl.exe"

    REM Run the cli.bat with the "update" option
    CALL "%CLIBAT%" update

    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...