1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

.bat file to change boot.ini, timeout to 0

Discussion in 'Windows XP' started by wahlroot, 2009/03/09.

  1. 2009/03/09
    wahlroot

    wahlroot Inactive Thread Starter

    Joined:
    2002/08/15
    Messages:
    546
    Likes Received:
    1
    When I change Msconfig and restart, boot.ini timeout is changed from 0 to 3. Is there a way to put something in a .bat file that runs at startup to change boot.ini timeout back to 0.
     
  2. 2009/03/09
    wildfire

    wildfire Getting Old

    Joined:
    2008/04/21
    Messages:
    4,649
    Likes Received:
    124
    Is three seconds that important?

    I could throw something together for you but it'd be risky and not worth the gamble IMHO.

    Perhaps we should ask Why is MSCONFIG adding this delay, and why are you using it (MSCONFIG) anyway? Usually it's better to solve the problem rather than the side effects.

    Copies of your boot.ini before and after would be helpful.
     

  3. to hide this advert.

  4. 2009/03/09
    wahlroot

    wahlroot Inactive Thread Starter

    Joined:
    2002/08/15
    Messages:
    546
    Likes Received:
    1
    Some programs put a check in msconfig, startup. The only way I find to stop that is in msconfig. The startups are not in services, or in the program. My boot .ini timeout=0, is changed by msconfig, to timeout=3. Nothing fatal there, but a pain in the neck for me.
     
  5. 2009/03/09
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    Yes, you can do that but it wouldn't affect the first boot since it wouldn't run until you had already been paused. If that's acceptable, post back and I'll continue.
     
  6. 2009/03/09
    wildfire

    wildfire Getting Old

    Joined:
    2008/04/21
    Messages:
    4,649
    Likes Received:
    124
    I'll leave you in Surferdude's capable hands but messing with boot.ini just to save 3 seconds is still dodgy in my opinion.

    You're far better editing by hand, you shouldn't be using MSCONFIG that often.
     
  7. 2009/03/09
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    I'm getting the supper call here so 'll pass along the instructions and check back later in case you need further. This will keep it simple and safe:

    All you need to do is open your existing boot.ini file and save it under a different name, boot.xyz for example. Be sure it's saved to the root of your C: drive. Then open notepad and type:

    copy C:\boot.xyz C:\boot.ini

    Save that line to a file name of your choice but use the .bat extension, such as BOOT.BAT. Put that on the root of your C: then right click it and create a shortcut. Click that shortcut and select CUT. Then go to Start > Run and type:
    "%userprofile%\start menu\programs\startup " and click OK. When the startup folder opens right click in it and select paste. The shortcut will appear in the field. It will run upon startup and return your boot.ini file to its original version.
     
  8. 2009/03/09
    wildfire

    wildfire Getting Old

    Joined:
    2008/04/21
    Messages:
    4,649
    Likes Received:
    124
    @Surferdude2

    Let's just hope wahlroot doesn't change to a multiboot system in the future ;)

    A small exe which only removes the timeout would be better rather than restoring a previous boot.ini which may become invalid.
     
  9. 2009/03/09
    PeteC

    PeteC SuperGeek Staff

    Joined:
    2002/05/10
    Messages:
    28,896
    Likes Received:
    389
    Several programs far more siutable to control startups than msconfig ....

    Starter

    Startup Control Panel

    Winpatrol

    Autoruns
     
  10. 2009/03/09
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    Yes, there are possible pitfalls to modifying the startup process and one must be careful to not get locked out. That's not tragic but just a little inconvenient.

    I always keep a "Quick Boot" CD and floppy to direct the process if/when necessary. I also keep a NTFS (editbini.exe) editing floppy and CD to complete the 2 belts, 2 suspenders, and 2 pieces of rope backup method.

    However, without a good safety net, it's not advisable to take chances. I no doubt go overboard in both areas. ;)
     
  11. 2009/03/09
    wahlroot

    wahlroot Inactive Thread Starter

    Joined:
    2002/08/15
    Messages:
    546
    Likes Received:
    1
    Surferdude2! I have a .bat file that runs at startup to do other things, so I put what was said in it, and it did not work.
     
  12. 2009/03/09
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    Be sure you remove the "Read Only" attribute from your present boot.ini file.
     
  13. 2009/03/09
    wahlroot

    wahlroot Inactive Thread Starter

    Joined:
    2002/08/15
    Messages:
    546
    Likes Received:
    1
    Boot.ini is never Read Only.
     
  14. 2009/03/09
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    Actually it's also set to "Hidden" by default. Change that and test.

    The COPY command cannot see hidden files nor can it write to read only files.

    I checked with MS, they say the boot.ini file is a HIDDEN, READ-ONLY, SYSTEM file.
     
    Last edited: 2009/03/09
  15. 2009/03/10
    wahlroot

    wahlroot Inactive Thread Starter

    Joined:
    2002/08/15
    Messages:
    546
    Likes Received:
    1
    I have hidden files shown at all times. If boot.ini is Read-only, msconfig can still change it to timeout=3. I cannot change it without changing out of Read-only to go back to timeout=0. So I leave it out of Read-only. OK surferdude2. Thanks for your help. Appears that I am stuck again by MS. I did make a .bat file to get rid of the notice that appears at restart after making changes to msconfig. I make a lot of changes with that .bat file at startup. Mostly delete junk. It not only saves time, but I do not have to sit and watch it startup.
     
  16. 2009/03/10
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    That's not the same thing as removing the HIDDEN attribute on a file. The COPY command won't see hidden files even though you are set to view them in Windows Explorer. That's two different things altogether.
     
  17. 2009/03/10
    wildfire

    wildfire Getting Old

    Joined:
    2008/04/21
    Messages:
    4,649
    Likes Received:
    124
    @surferdude2

    Perhaps it's best to leave batch editing of boot.ini alone?

    @wahlroot

    Have you looked at petec's suggestions earlier?

    You've already mentioned you don't need to watch start up, again I'll ask is 3 seconds that important? I'll happily throw together an exe file for you that can be run in a batch file but is it really worth it?
     
  18. 2009/03/10
    wahlroot

    wahlroot Inactive Thread Starter

    Joined:
    2002/08/15
    Messages:
    546
    Likes Received:
    1
    No lets leave well enough alone. I will go on as before.
     
  19. 2009/03/10
    surferdude2

    surferdude2 Inactive

    Joined:
    2004/07/04
    Messages:
    4,009
    Likes Received:
    23
    I expect that's true. If you can't cut the mustard, you'd best leave the lid on the jar and leave the genie alone.
     
  20. 2009/03/13
    narutokage

    narutokage Inactive

    Joined:
    2009/03/13
    Messages:
    9
    Likes Received:
    0
    it is system file, can't replace, must use attrib:

    .bat 1 code (time out 0 -> 3):

    Code:
    attrib -r -h -s boot.ini
    ren boot.ini boot.backup
    copy X\boot.ini c:                        note:(X: path of file boot.ini (new))
    attrib +r +h +s c:\boot.ini
    note: you can use file boot.ini here:

    Code:
    [boot loader]
    [B]timeout=3[/B]
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS= "Microsoft Windows XP Professional" /noexecute=optin /fastdetect
    .bat 2 code (time out 3 -> 0):

    Code:
    attrib -r -h -s c:\boot.ini
    del boot.ini
    ren c:\boot.backup boot.ini
    attrib +r +h +s c:\boot.ini
    I am not good at english, maybe I help you ??

    good luck !! :)
     
    Last edited: 2009/03/13
  21. 2009/03/13
    Brian1951

    Brian1951 Well-Known Member

    Joined:
    2005/03/21
    Messages:
    71
    Likes Received:
    0
    If you ask me it's much ado about 3 seconds.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.