diff --git a/programs/build_all.bat b/programs/build_all.bat
index ffb05332ae..08f495e93c 100644
--- a/programs/build_all.bat
+++ b/programs/build_all.bat
@@ -51,7 +51,7 @@ echo Enter CPU_type ("p5" for interrupt, "p6" for SYSENTER, "k6" for SYSCALL)
 call :input_value res %__CPU_type%
 echo __CPU_type fix %res% > config.inc
 
-for %%i in (%BIN% %BIN%\demos %BIN%\develop %BIN%\lib %BIN%\games %BIN%\network %BIN%\3d %BIN%\fonts) do if not exist %%i mkdir %%i
+for %%i in (%BIN% %BIN%\demos %BIN%\develop %BIN%\lib %BIN%\games %BIN%\network %BIN%\3d %BIN%\fonts %BIN%\nightbuild) do if not exist %%i mkdir %%i
 
 echo *
 echo Building system
@@ -227,6 +227,16 @@ fasm demos\trantest\trunk\trantest.asm %BIN%\demos\trantest
 fasm demos\tube\trunk\tube.asm %BIN%\demos\tube
 fasm demos\unvwater\trunk\unvwater.asm %BIN%\demos\unvwater
 
+echo *
+echo Building depend application for fdd's nightbuild
+echo *
+echo __nightbuild fix yes >> config.inc
+fasm media\kiv\trunk\kiv.asm %BIN%\nightbuild\kiv
+
+
+
+;restore
+echo __CPU_type fix %res% > config.inc
 erase lang.inc
 
 echo *
@@ -414,6 +424,12 @@ kpack %BIN%\demos\trantest
 kpack %BIN%\demos\tube
 kpack %BIN%\demos\unvwater
 
+echo *
+echo Compressing nightbuild
+echo *
+kpack %BIN%\nightbuild\kiv
+
+
 echo *
 echo Compressing complete
 echo *
diff --git a/programs/media/kiv/trunk/kiv.asm b/programs/media/kiv/trunk/kiv.asm
index 83ce6985ae..cc66bdbd7d 100644
--- a/programs/media/kiv/trunk/kiv.asm
+++ b/programs/media/kiv/trunk/kiv.asm
@@ -8,7 +8,7 @@ dd 0x01, START, I_END, F_END, stacktop, @PARAMS, 0x0
 
 FALSE = 0
 TRUE  = 1
-
+include '../../../config.inc'		;for nightbuild
 include '../../../proc32.inc'
 include '../../../macros.inc'
 include 'dll.inc'
@@ -1051,8 +1051,13 @@ OpenDialog_data:
 
 communication_area_name:
     db 'FFFFFFFF_open_dialog',0
+
 open_dialog_path:
+if __nightbuild eq yes
+    db '/sys/MANAGERS/opendial',0
+else
     db '/sys/File Managers/opendial',0
+end if
 communication_area_default_pach:
     db '/rd/1',0