set GameDir=
if not defined GameDir for /f "tokens=2*" %%a in (
 'REG QUERY HKLM\SOFTWARE\Wow6432Node\LucasArts\KotOR2\ /v Path 2^>NUL ^| findstr Path'
  ) do set GameDir=%%~b

cd %GameDir%

xcopy "Hard As Hell\Source\nwscript.nss" "Hard As Hell\tslpatchdata\"  /Y

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\Dagobah\978DAG\k_978_enter.nss"

pause
