07-23-2023, 09:42 AM
In general, this is to add an EXE or DLL file on the path. As long as this file won’t appear anywhere else:
@echo off
where /q <put filename here>
if %errorlevel% == 1 (
setx PATH "%PATH%;<additional path stuff>"
) else (
echo "already set path"
)
@echo off
where /q <put filename here>
if %errorlevel% == 1 (
setx PATH "%PATH%;<additional path stuff>"
) else (
echo "already set path"
)