February 15, 200620 yr As every one has shared some knowledge, I'll throw my two cents in:@ECHO OFFREM ATTRIB -H -S -R C:\BOOT.INIecho [Boot Loader] > C:\boot.tmpecho Timeout=0 >> C:\boot.tmptype boot.ini | FIND /V "[Boot Loader]" | FIND /V "Timeout=" >> C:\boot.tmpCopy C:\BOOT.TMP C:\BOOT.INI > NULDEL C:\BOOT.TMPREM ATTRIB +H +S +R C:\BOOT.INI(you will need to UNrem the two remmed lines)Maybe it's brutal, but no need for FOR loops, conditional statements or external utilities....jaclazP.S.: the line "type boot.ini | .....>> C:\boot.tmp" has to be on the SAME line Edited February 15, 200620 yr by jaclaz
February 15, 200620 yr Author Dear jaclaz,It's interesting. My earlier brush with a script from cancerface yielded no positive results. your and his looks a lot have in common. I'll give it a try, but i always test in real install instead of VMs. So, it'll take a couple of days as i've to get ready a few more things for the next install.BTW, in this context i wish to mention a few more observations that may interest all of us. Here are they...1. Just to fix timeout to 0 could be done without a script. I've noticed that setting,[setupData]OsLoadTimeout=0in WINNT.SIF file really fixes the issue.2. However, if our WINNT.SIF looks like below, [setupData]OsLoadTimeout=0OSLoadOptionsVar="/noexecute=AlwaysOff"OSLoadIdentifier="Windows XP SP2 UnAttended"then, /noexecute=AlwaysOff gets inserted into Boot.ini but doesn't serve its purpose as boot.ini then looks like,[boot loader]timeout=0default=multi(0)disk(0)rdisk(0)partition(4)\WINDOWS[operating systems]multi(0)disk(0)rdisk(0)partition(4)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /noexecute=AlwaysOff /fastdetectmulti(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptInSo, disabling software-based DEP couldn't be handled properly as the default /noexecute=optin is enetred irrespective of what we set under OSLoadOptionsVar.To me it seems that it's only fit for 64-bit edition, directly.3. As for the OSLoadIdentifier="Windows XP SP2 UnAttended", it really doesn't take off at all. Boot.ini still shows only "Microsoft Windows XP Professional". No effect.I'll much like if such things could be managed by a batch file as you, Yzowl and prathapml tried to formulate for the timeout issue.Thanks. Edited February 15, 200620 yr by MOONLIGHT SONATA
March 16, 200620 yr @MOONLIGHT SONATASorry for the laaaaaate response but I did not keep up with this thread Anyway, you didn't find anything wrong with the script I posted, but looking at the code just now I reallized that copy/paste in fact altered it a bit:It should read:IF NOT EXIST %SystemDrive%\BOOT.INI (ECHO Restoring original BOOT.INI© %SystemDrive%\BOOT.OLD %SystemDrive%\BOOT.INI)yet if the above is entered within CODE tags it gives:IF NOT EXIST %SystemDrive%\BOOT.INI (ECHO Restoring original BOOT.INI© %SystemDrive%\BOOT.OLD %SystemDrive%\BOOT.INI)... I just spotted the difference the © becomes a copywrite sign © I can confirm that the script works if run from cmdlines, although I run it right after I install recovery console (from cmdlines) ... Not sure if this changes things for youCF@jaclazYou're right, the script I posted is unreasonably complicated I think I picked it up from some site looooong time ago...[Edit]The script came from Rob van der Woude's site and can be found here. There is also another version that may be of use to MOONLIGHT_SONATA here. Edited March 22, 200620 yr by cancerface
March 22, 200620 yr Playing around with wmic.exe I saw that you can change some Boot.ini options.In order to get a 0sec delay you can try:%SystemRoot%\System32\Wbem\wmic.exe ComputerSystem Set SystemStartupDelay="0"Also it seems that you can set the boot parameters as well as the name that appears on the boot menu with:%SystemRoot%\System32\Wbem\wmic.exe Set SystemStartupOptions="<options>"This however is a bit more complicated so you might want to try on a working machine the next in order to get an idea of what the SystemStartupOptions might be:%SystemRoot%\System32\Wbem\wmic.exe Get SystemStartupOptionsNote that the above were not tested upon building a machine ie I am not sure if wmic.exe is accesible via cmdlines ...CF Edited March 22, 200620 yr by cancerface
March 22, 200620 yr @jaclazI have used the msdn page although you can get all the info from the cmd prompt ... wmic.exe /?CF
March 22, 200620 yr this is mine boot.ini @echo off ATTRIB -R -S -H %systemdrive%\boot.ini del /F /Q %systemdrive%\boot.ini SET inifile="%systemdrive%\boot.ini" ECHO [boot loader]>> %inifile% ECHO timeout=4 >> %inifile% ECHO default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS >> %inifile% ECHO [operating systems] >> %inifile% ECHO multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="XP Professional" /noexecute=ALWAYSOFF /fastdetect >> %inifile% ATTRIB +R +S +H %systemdrive%\boot.ini Edited March 22, 200620 yr by Yurek3
March 23, 200620 yr @Yurek3If you change the lineECHO [boot loader] >> %inifile%toECHO [boot loader] > %inifile%(taking out a > )you can remove the linedel /F /Q %systemdrive%\boot.inifrom your batch.jaclaz
Create an account or sign in to comment