@echo off
REM script to install all available PointCab 4Vectorworks Plugins

SETLOCAL
REM cls
color A

cd /d "%~dp0"
cd installer

if %ERRORLEVEL% NEQ 0 (
    echo Error: Could not change directory!
	echo Please install the Plugins yourself, by opening the folder installer and double clicking the different installers
    cmd /k
)

REM Count how many Vectorworks Plugin versions were installed
set "count=0"

if EXIST "%APPDATA%\Nemetschek\Vectorworks\2025\Plug-Ins\" (
    echo Install 4Vectorworks 2025
	PointCab4Vectorworks2025.exe
	REM use "PointCab4Vectorworks2025.exe /VERYSILENT" to suppress all dialog
	set /a count+=1
)

if EXIST "%APPDATA%\Nemetschek\Vectorworks\2026\Plug-Ins\" (
	echo Install 4Vectorworks 2026
    PointCab4Vectorworks2026.exe
	set /a count+=1
)

if %count% EQU 0 (
    echo No valid Vectorworks installation was found.
	cmd /k
) 

color F
ENDLOCAL