Код:
@Echo Off
rem список путей, которые нужно дописать в переменную Path
For %%a In (
"%ProgramFiles%\7-Zip"
"%ProgramFiles%\EmEditor"
"%ProgramFiles%\WinRAR"
) Do Call :_addPath %%a
Exit
:_addPath
Set sw="HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
For /F "tokens=2*" %%j In ('Reg Query %sw% /v Path ^| Find /I "Path"') Do Set type=%%j& Set curpath=%%k
Echo "%curpath%" | Find /I "%~1" >Nul && GoTo :EOF
Reg Add %sw% /v Path /t %type% /d "%curpath%;%~1" /f
GoTo :EOF