Index: trunk/src/VBox/Main/UnattendedTemplates/os2_cid_install.cmd
===================================================================
--- trunk/src/VBox/Main/UnattendedTemplates/os2_cid_install.cmd	(revision 93124)
+++ trunk/src/VBox/Main/UnattendedTemplates/os2_cid_install.cmd	(revision 93127)
@@ -20,5 +20,6 @@
 if "%1" == "PHASE1" goto phase1
 if "%1" == "PHASE2" goto phase2
-@echo ** error: invalid or missing parameter. Expected PHASE1 or PHASE2 as the first parameter to the script.
+if "%1" == "PHASE3" goto phase3
+@echo ** error: invalid or missing parameter. Expected PHASE1, PHASE2 or PHASE3 as the first parameter to the script.
 pause
 cmd.exe
@@ -135,7 +136,7 @@
 cd C:\OS2
 C:
-C:\VBoxCID\OS2_UTIL.EXE -- C:\VBoxCID\SEMAINT.EXE /S:%CDROM%\os2image /B:C: /L1:C:\VBoxCID\1.4.1-Maint.log /T:C:\OS2
-REM does not exit with status 0 on success.
-goto semaint_ok
+@REM Treat 0xfe00 as a success status. It seems to mean that a reboot is required.
+C:\VBoxCID\OS2_UTIL.EXE --as-zero 0xfe00 -- C:\VBoxCID\SEMAINT.EXE /S:%CDROM%\os2image /B:C: /L1:C:\VBoxCID\1.4.1-Maint.log /T:C:\OS2 && goto semaint_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\VBoxCID\1.4.1-Maint.log
 pause
 :semaint_ok
@@ -144,7 +145,7 @@
 cd C:\VBoxCID
 C:
-C:\VBoxCID\OS2_UTIL.EXE -- C:\VBoxCID\SEINST.EXE /S:%CDROM%\os2image /B:C: /L1:C:\VBoxCID\1.4.2-CIDInst.log /R:C:\VBoxCID\OS2.RSP /T:A:\
-REM does not exit with status 0 on success.
-goto seinst_ok
+@REM Treat 0xff02 as a success status. It seems to mean that a reboot is required.
+C:\VBoxCID\OS2_UTIL.EXE --as-zero 0xff02 -- C:\VBoxCID\SEINST.EXE /S:%CDROM%\os2image /B:C: /L1:C:\VBoxCID\1.4.2-CIDInst.log /R:C:\VBoxCID\OS2.RSP /T:A:\ && goto seinst_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\VBoxCID\1.4.2-CIDInst.log
 pause
 :seinst_ok
@@ -189,5 +190,5 @@
 
 REM
-REM Phase 2 - The rest of the installation running of the base install.
+REM Phase 2 - Install GRADD drivers (VGA is horribly slow).
 REM
 :phase2
@@ -218,13 +219,17 @@
 @echo Step 2.1 - Install the video driver.
 @echo .
-C:\VBoxCID\OS2_UTIL.EXE -- C:\OS2\INSTALL\DspInstl.EXE /PD:C:\OS2\INSTALL\GENGRADD.DSC /S:%CDROM%\OS2IMAGE /T:C: /RES:1024X768X16777216 /U
-@REM does not exit with status 0 on success.
-goto dspinstl_ok
+@REM Treat 0xfe00 as a success status. It seems to mean that a reboot is required.
+C:\VBoxCID\OS2_UTIL.EXE --as-zero 0xfe00 -- C:\OS2\INSTALL\DspInstl.EXE /PD:C:\OS2\INSTALL\GENGRADD.DSC /S:%CDROM%\OS2IMAGE /T:C: /RES:1024X768X16777216 /U && goto dspinstl_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\OS2\INSTALL\DSPINSTL.LOG
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\OS2\INSTALL\GRADD.LOG
 pause
 :dspinstl_ok
 
-call VCfgCID.CMD /L1:C:\VBoxCID\2.1-Video.log /L2:C:\VBoxCID\2.1-Video-2.log /RES:1024X768X16777216
 @REM TODO: Error: 1 Error getting current desktop mode
+@REM UPDATE: This is probably not working because SVGA.EXE doesn't want to play along with our graphics adapter,
+@REM         so it looks like there is no simple way of changing the resolution or select a better monitor.
+call VCfgCID.CMD /L1:C:\VBoxCID\2.1-Video.log /L2:C:\VBoxCID\2.1-Video-2.log /RES:1024X768X16777216 /MON:548
 goto vcfgcid_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\VBoxCID\2.1-Video.log
 pause
 :vcfgcid_ok
@@ -233,53 +238,69 @@
 
 :step2_2
-@echo .
-@echo Step 2.2 - Install multimedia.
+@echo Install startup.cmd for phase3.
+ren C:\STARTUP.CMD C:\VBoxCID\Phase2-end-startup.cmd
+@echo C:\VBoxCID\OS2_UTIL.EXE --tee-to-backdoor --tee-to-file C:\VBoxCID\Phase3.log --append -- C:\OS2\CMD.EXE /C C:\VBoxCID\VBoxCID.CMD PHASE3> C:\STARTUP.CMD && goto phase3_startup_ok
+pause
+:phase3_startup_ok
+
+REM now reboot.
+goto reboot
+
+
+REM
+REM Phase 2 - The rest of the installation running of the base install with fast GRADD drivers.
+REM
+:phase3
+SET CDROM=E:
+IF EXIST "%CDROM%\VBoxCID.CMD" goto phase3_found_cdrom
+SET CDROM=D:
+IF EXIST "%CDROM%\VBoxCID.CMD" goto phase3_found_cdrom
+SET CDROM=F:
+IF EXIST "%CDROM%\VBoxCID.CMD" goto phase3_found_cdrom
+SET CDROM=G:
+IF EXIST "%CDROM%\VBoxCID.CMD" goto phase3_found_cdrom
+SET CDROM=H:
+IF EXIST "%CDROM%\VBoxCID.CMD" goto phase3_found_cdrom
+SET CDROM=S:
+IF EXIST "%CDROM%\VBoxCID.CMD" goto phase3_found_cdrom
+@echo ** error: Unable to find the CDROM drive
+pause
+CMD
+SET CDROM=E:
+:phase3_found_cdrom
+cd C:\VBoxCID
+C:
+
+@echo on
+
+:step3_1
+@echo .
+@echo Step 3.1 - Install multimedia.
 @echo .
 cd C:\mmtemp
 C:
-DIR
-C:\VBoxCID\OS2_UTIL.EXE -- MInstall.EXE /M /R:C:\VBoxCID\MMOS2.RSP && goto mmos2_ok
-@REM TODO: crashes
+@REM Does not have any /L, /L1, or /L2 options.  Fixed log file: C:\MINSTALL.LOG.
+@REM Treat 0xfe00 as a success status. It seems to mean that a reboot is required.
+C:\VBoxCID\OS2_UTIL.EXE --as-zero 0xfe00 -- MInstall.EXE /M /R:C:\VBoxCID\MMOS2.RSP && goto mmos2_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\MINSTALL.LOG
 pause
 :mmos2_ok
-DIR
-cd C:\VBoxCID
-
-:step2_3
-@echo .
-@echo Step 2.3 - Install features.
-@echo .
-C:\VBoxCID\OS2_UTIL.EXE -- CLIFI.EXE /A:C /B:C: /S:%CDROM%\os2image\fi /R:C:\OS2\INSTALL\FIBASE.RSP /L1:C:\VBoxCID\2.2-FeatureInstaller.log /R2:C:\VBoxCID\OS2.RSP
+cd C:\VBoxCID
+
+:step3_2
+@echo .
+@echo Step 3.2 - Install features.
+@echo .
+@REM Treat 0xfe00 as a success status. It seems to mean that a reboot is required.
+C:\VBoxCID\OS2_UTIL.EXE --as-zero 0xfe00 -- CLIFI.EXE /A:C /B:C: /S:%CDROM%\os2image\fi /R:C:\OS2\INSTALL\FIBASE.RSP /L1:C:\VBoxCID\3.2-FeatureInstaller.log /R2:C:\VBoxCID\OS2.RSP
 @REM does not exit with status 0 on success.
 goto features_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\VBoxCID\3.2-FeatureInstaller.log
 pause
 :features_ok
 
-:step2_4
-@echo .
-@echo Step 2.4 - Install Netscape.
-@echo .
-CD C:\VBoxCID
-C:
-%CDROM%
-SET DPATH=%DPATH%;C:\NETSCAPE\SIUTIL;
-C:\VBoxCID\OS2_UTIL.EXE -- %CDROM%\CID\SERVER\NETSCAPE\INSTALL.EXE /X /A:I /TU:C: /C:%CDROM%\CID\SERVER\NETSCAPE\NS46.ICF /S:%CDROM%\CID\SERVER\NETSCAPE /R:C:\VBoxCID\Netscape.RSP /L1:C:\VBoxCID\2.8-Netscape.log /L2:C:\VBoxCID\2.8-Netscape-2.log && goto netscape_ok
-:netscape_ok
-CD %CDROM%\
-C:
-
-:step2_5
-@echo .
-@echo Step 2.5 - Install feature installer.
-@echo .
-@REM No /L2: support.
-@REM The /NN option is to make it not fail if netscape is missing.
-C:\VBoxCID\OS2_UTIL.EXE -- C:\OS2\INSTALL\WSFI\FiSetup.EXE /B:C: /S:C:\OS2\INSTALL\WSFI\FISETUP /NN /L1:C:\VBoxCID\2.5-FiSetup.log && goto fisetup_ok
-pause
-:fisetup_ok
-
-:step2_6
-@echo .
-@echo Step 2.6 - Install MPTS.
+:step3_3
+@echo .
+@echo Step 3.3 - Install MPTS.
 @echo .
 @REM If we want to use non-standard drivers like the intel ones, copy the .NIF- and
@@ -289,5 +310,7 @@
 CD %CDROM%\CID\SERVER\MPTS
 %CDROM%
-C:\VBoxCID\OS2_UTIL.EXE -- %CDROM%\CID\SERVER\MPTS\MPTS.EXE /R:C:\VBoxCID\MPTS.RSP /S:%CDROM%\CID\SERVER\MPTS /T:C: /L1:C:\VBoxCID\2.6-Mpts.log && goto mpts_ok
+@REM Treat 0xfe00 as a success status. It seems to mean that a reboot is required.
+C:\VBoxCID\OS2_UTIL.EXE --as-zero 0xfe00 -- %CDROM%\CID\SERVER\MPTS\MPTS.EXE /R:C:\VBoxCID\MPTS.RSP /S:%CDROM%\CID\SERVER\MPTS /T:C: /L1:C:\VBoxCID\3.3-Mpts.log && goto mpts_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\VBoxCID\3.3-Mpts.log
 pause
 :mpts_ok
@@ -295,13 +318,13 @@
 C:
 
-:step2_7
-@echo .
-@echo Step 2.7 - Install TCP/IP.
+:step3_4
+@echo .
+@echo Step 3.4 - Install TCP/IP.
 @echo .
 CD %CDROM%\CID\SERVER\TCPAPPS
 %CDROM%
-C:\VBoxCID\OS2_UTIL.EXE -- CLIFI.EXE /A:C /B:C: /S:%CDROM%\CID\SERVER\TCPAPPS\INSTALL /R:%CDROM%\CID\SERVER\TCPAPPS\INSTALL\TCPINST.RSP /L1:C:\VBoxCID\2.7-tcp.log /L2:C:\VBoxCID\2.7-tcp-2.log
-@REM does not exit with status 0 on success.
-goto tcp_ok
+@REM Treat 0xfe00 as a success status. It seems to mean that a reboot is required.
+C:\VBoxCID\OS2_UTIL.EXE --as-zero 0xfe00 -- CLIFI.EXE /A:C /B:C: /S:%CDROM%\CID\SERVER\TCPAPPS\INSTALL /R:%CDROM%\CID\SERVER\TCPAPPS\INSTALL\TCPINST.RSP /L1:C:\VBoxCID\3.4-tcp.log /L2:C:\VBoxCID\3.4-tcp-2.log && goto tcp_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\VBoxCID\3.4-tcp.log
 pause
 :tcp_ok
@@ -316,19 +339,49 @@
 cd %CDROM%\
 
-:step2_8
-@echo .
-@echo Step 2.8 - Install IBM LAN Requestor/Peer.
+:step3_5
+@echo .
+@echo Step 3.5 - Install IBM LAN Requestor/Peer.
 @echo .
 SET REMOTE_INSTALL_STATE=CAS_OS/2 Peer
 CD %CDROM%\CID\SERVER\IBMLS
 %CDROM%
-C:\VBoxCID\OS2_UTIL.EXE -- %CDROM%\CID\SERVER\IBMLS\LANINSTR.EXE /REQ /R:C:\VBoxCID\IBMLan.rsp /L1:C:\VBoxCID\2.8-IBMLan.log /L2:C:\VBoxCID\2.8-IBMLan-2.log && goto ibmlan_ok
+C:\VBoxCID\OS2_UTIL.EXE -- %CDROM%\CID\SERVER\IBMLS\LANINSTR.EXE /REQ /R:C:\VBoxCID\IBMLan.rsp /L1:C:\VBoxCID\3.5-IBMLan.log /L2:C:\VBoxCID\3.5-IBMLan-2.log && goto ibmlan_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\VBoxCID\3.5-IBMLan.log
 :ibmlan_ok
 CD %CDROM%\
 C:
 
-:step2_9
-@echo .
-@echo Step 2.9 - Install guest additions.
+:step3_6
+@echo .
+@echo Step 3.6 - Install Netscape.
+@echo .
+CD C:\VBoxCID
+C:
+%CDROM%
+@REM Skipping as it hangs after a "Message file not found." error. (The DPATH amendment doesn't help.)  Logs give no clue.
+@REM Maybe we're installing it too early?  Needs TCPIP or smth.
+goto netscape_ok
+SET DPATH=%DPATH%;C:\NETSCAPE\SIUTIL;
+C:\VBoxCID\OS2_UTIL.EXE -- %CDROM%\CID\SERVER\NETSCAPE\INSTALL.EXE /X /A:I /TU:C: /C:%CDROM%\CID\SERVER\NETSCAPE\NS46.ICF /S:%CDROM%\CID\SERVER\NETSCAPE /R:C:\VBoxCID\Netscape.RSP /L1:C:\VBoxCID\3.6-Netscape.log /L2:C:\VBoxCID\3.6-Netscape-2.log && goto netscape_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\VBoxCID\3.6-Netscape.log
+pause
+:netscape_ok
+CD %CDROM%\
+C:
+
+:step3_7
+@echo .
+@echo Step 3.7 - Install feature installer.
+@echo .
+@REM No /L2: support.
+@REM The /NN option is to make it not fail if netscape is missing.
+C:\VBoxCID\OS2_UTIL.EXE -- C:\OS2\INSTALL\WSFI\FiSetup.EXE /B:C: /S:C:\OS2\INSTALL\WSFI\FISETUP /NN /L1:C:\VBoxCID\3.7-FiSetup.log && goto fisetup_ok
+C:\VBoxCID\OS2_UTIL.EXE --file-to-backdoor C:\VBoxCID\3.7-FiSetup.log
+pause
+:fisetup_ok
+
+:step3_8
+@echo .
+@echo Step 3.8 - Install guest additions.
 @echo .
 @@VBOX_COND_IS_INSTALLING_ADDITIONS@@
@@ -342,7 +395,7 @@
 @@VBOX_COND_END@@
 
-:step2_10
-@echo .
-@echo Step 2.10 - Install the test execution service (TXS).
+:step3_9
+@echo .
+@echo Step 3.9 - Install the test execution service (TXS).
 @echo .
 @@VBOX_COND_IS_INSTALLING_TEST_EXEC_SERVICE@@
@@ -360,7 +413,7 @@
 
 
-:step2_11
-@echo .
-@echo Step 2.11 - Install final startup.cmd and copy over OS2LDR again.
+:step3_10
+@echo .
+@echo Step 3.9 - Install final startup.cmd and copy over OS2LDR again.
 @echo .
 attrib -r -h -s C:\STARTUP.CMD
@@ -379,7 +432,7 @@
 attrib +r +h +s C:\OS2LDR
 
-:step2_12
-@echo .
-@echo Step 2.12 - Cleanup
+:step3_11
+@echo .
+@echo Step 3.11 - Cleanup
 @echo .
 del /N C:\*.bio
@@ -400,8 +453,8 @@
 :skip_sys_cleanup
 
-:step2_13
+:step3_12
 @@VBOX_COND_HAS_POST_INSTALL_COMMAND@@
 @echo .
-@echo Step 2.13 - Custom actions: "@@VBOX_INSERT_POST_INSTALL_COMMAND@@"
+@echo Step 3.12 - Custom actions: "@@VBOX_INSERT_POST_INSTALL_COMMAND@@"
 @echo .
 cd C:\VBoxCID
Index: trunk/src/VBox/Main/UnattendedTemplates/os2_response_files.rsp
===================================================================
--- trunk/src/VBox/Main/UnattendedTemplates/os2_response_files.rsp	(revision 93124)
+++ trunk/src/VBox/Main/UnattendedTemplates/os2_response_files.rsp	(revision 93127)
@@ -21,7 +21,8 @@
 REM Just to be on the safe side, all paths include disk #0 thru #6.
 REM as it doesn't contain much interesting.
-  LIBPATH=.;A:\;S:\OS2IMAGE\DISK_0;S:\OS2IMAGE\DISK_1;S:\OS2IMAGE\DISK_2;S:\OS2IMAGE\DISK_3;S:\OS2IMAGE\DISK_4;S:\OS2IMAGE\DISK_5;S:\OS2IMAGE\DISK_6;S:\OS2IMAGE\DISK_7;
-SET  PATH=.;A:\;S:\OS2IMAGE\DISK_0;S:\OS2IMAGE\DISK_1;S:\OS2IMAGE\DISK_2;S:\OS2IMAGE\DISK_3;S:\OS2IMAGE\DISK_4;S:\OS2IMAGE\DISK_5;S:\OS2IMAGE\DISK_6;S:\OS2IMAGE\DISK_7;
-SET DPATH=.;A:\;S:\OS2IMAGE\DISK_0;S:\OS2IMAGE\DISK_1;S:\OS2IMAGE\DISK_2;S:\OS2IMAGE\DISK_3;S:\OS2IMAGE\DISK_4;S:\OS2IMAGE\DISK_5;S:\OS2IMAGE\DISK_6;S:\OS2IMAGE\DISK_7;
+REM Also adding typical C:\ locations for good measure...
+  LIBPATH=.;A:\;S:\OS2IMAGE\DISK_0;S:\OS2IMAGE\DISK_1;S:\OS2IMAGE\DISK_2;S:\OS2IMAGE\DISK_3;S:\OS2IMAGE\DISK_4;S:\OS2IMAGE\DISK_5;S:\OS2IMAGE\DISK_6;S:\OS2IMAGE\DISK_7;C:\OS2\DLL;C:\MPTN\DLL;C:\TCPIP\DLL;C:\IBMCOM\DLL;
+SET  PATH=.;A:\;S:\OS2IMAGE\DISK_0;S:\OS2IMAGE\DISK_1;S:\OS2IMAGE\DISK_2;S:\OS2IMAGE\DISK_3;S:\OS2IMAGE\DISK_4;S:\OS2IMAGE\DISK_5;S:\OS2IMAGE\DISK_6;S:\OS2IMAGE\DISK_7;C:\OS2;C:\OS2\SYSTEM;
+SET DPATH=.;A:\;S:\OS2IMAGE\DISK_0;S:\OS2IMAGE\DISK_1;S:\OS2IMAGE\DISK_2;S:\OS2IMAGE\DISK_3;S:\OS2IMAGE\DISK_4;S:\OS2IMAGE\DISK_5;S:\OS2IMAGE\DISK_6;S:\OS2IMAGE\DISK_7;C:\OS2;C:\OS2\SYSTEM;
 
 COUNTRY=001,COUNT437.SYS
@@ -156,5 +157,5 @@
     Local_IPC = YES
     INET_Access = YES
-    NETBIOS_Access = NO
+    NETBIOS_Access = YES
 )
 
@@ -168,6 +169,6 @@
    netbeui_nif = netbeui.nif
    tcpbeui_nif = tcpbeui.nif
-   tcpip_nif = tcpip.nif
-   nonetadp_nif = nonetadp.nif
+   tcpip_nif   = tcpip.nif
+   IBMEAN_nif  = IBMEAN.nif
 
 [NETBIOS]
@@ -180,5 +181,5 @@
 
    DriverName = netbeui$
-   Bindings = NONETADP_nif
+   Bindings = IBMEAN_nif
    ETHERAND_TYPE = "I"
    USEADDRREV = "YES"
@@ -215,5 +216,5 @@
 
    DriverName = tcpbeui$
-   Bindings = nonetadp_nif
+   Bindings = ,IBMEAN_nif
    NODETYPE = "B-Node"
    OS2TRACEMASK = 0x0
@@ -237,9 +238,9 @@
 
    DriverName = TCPIP$
-   Bindings = nonetadp_nif
-
-[nonetadp_nif]
-
-   DriverName = NULLNDS$
+   Bindings = IBMEAN_nif
+
+[IBMEAN_nif]
+
+   DriverName = IBMEAN$
 )
 @@VBOX_SPLITTER_END[MPTS.RSP]@@
@@ -288,5 +289,5 @@
 # Multimedia Presentation Manager/2 response file - Setting up SB16.
 #
-@@VBOX_SPLITTER_START[MMPM2.RSP]@@
+@@VBOX_SPLITTER_START[MMOS2.RSP]@@
 MMINSTSOURCE = "C:\\mmtemp"
 MMINSTTARGET = "C:"
@@ -304,5 +305,5 @@
   GROUP.43 = "Sound Blaster 16=NUM=1,V1=1,V1=5,V1=5,V1=220,V1=330,"
   )
-@@VBOX_SPLITTER_END[MMPM2.RSP]@@
+@@VBOX_SPLITTER_END[MMOS2.RSP]@@
 
 #
