Just a simple batch that shortens up the reg.exe add command to add system variables to the windows registry. I will probably add some more options to specify string types and the ability to add extensions and paths to already existing variables, but this works for now. Code: @echo off EndLocal ::########################################################## ::ScriptName........: AddVars.bat ::ScriptPurpose.....: Adds System Variables to the Registry ::Required Files....: Reg.exe ::Date..............: 03/11/2011 ::Time..............: 19:38:44.24 ::Requirements......: System Reboot ::Syntax............: AddVars.bat TestVar="C:\Program Files" ::Notes.............: Must be ran with elevated privilages ::########################################################## REM Check User Args if [%1]==[] goto :Usage REM Set Variables set Value=%1 set Type=REG_SZ set Data=%2 REM Add Values to the Registry reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v %Value% /t %Type% /d %Data% :Usage REM Syntax and Usage Information echo.Usage: %0 [Variable]=[Value] echo. echo.Examples: %0 TestVar=%SystemRoot%\system32\calc.exe echo. %0 "Test Var"="%ProgramFiles%\My Directory" echo. echo.Adds system variables to the windows registry. echo.Requires a reboot of the system to take affect.