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

xcopy "Hard As Hell\Source\AI & Bean\st_inc_utils.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\st_inc_ai.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_gensupport.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_walkways.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_drop.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_generic.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_switch.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_utility.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_debug.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\Planets\Includes\k_inc_fakecombat.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\Planets\Includes\k_inc_glob_party.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\Planets\Includes\k_inc_hawk.nss" "Hard As Hell\Source\Planets\"  /Y

xcopy "Hard As Hell\Source\Planets\Includes\k_oei_hench_inc.nss" "Hard As Hell\Source\Planets\"  /Y

cd "%GameDir%\Hard As Hell\Source\Planets\"

"c:\program files\7-zip\7z" e "%GameDir%\Hard As Hell\Source\Powers\installer_proccessed.zip" 

cd %GameDir%

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_holoworld.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\k_003ebo_enter.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\tr_leave_ehawk.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\check_party_gui.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_galaxymap.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\k_sup_galaxymap.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_open_door.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\k_getitem.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\tr_vash.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_jediarrive.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_jediatk.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_650doorclose.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_end.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_kreia_att.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_kreia_att_2.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_kreia_drain_at.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_turnjedi.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\a_turnjedi2.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\k_death_kavar.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\k_death_vrook.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\k_death_zez.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\k_death_vash.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\k_def_650vash.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\jd_hasspell.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\jd_givespell.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Planets\jd_dont_show.nss"

del /q "Hard As Hell\Source\Planets\st_inc_utils.nss" 

del /q "Hard As Hell\Source\Planets\jd_constants.nss" 

del /q "Hard As Hell\Source\Planets\st_inc_ai.nss" 

del /q "Hard As Hell\Source\Planets\k_inc_gensupport.nss" 

del /q "Hard As Hell\Source\Planets\k_inc_walkways.nss" 

del /q "Hard As Hell\Source\Planets\k_inc_drop.nss" 

del /q "Hard As Hell\Source\Planets\k_inc_generic.nss" 

del /q "Hard As Hell\Source\Planets\k_inc_switch.nss" 

del /q "Hard As Hell\Source\Planets\k_inc_utility.nss"

del /q "Hard As Hell\Source\Planets\k_inc_debug.nss"

del /q "Hard As Hell\Source\Planets\k_inc_fakecombat.nss" 

del /q "Hard As Hell\Source\Planets\k_inc_glob_party.nss" 

del /q "Hard As Hell\Source\Planets\k_inc_hawk.nss" 

del /q "Hard As Hell\Source\Planets\k_oei_hench_inc.nss" 

pause
