• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

Win'98SE uptime

I want a record of uptime. If I wanted to make w98 write a bootlog every time it starts how do I set this, without going through the selective startup menu by holding cntrol when starting?
1 Solution
But is it possible to have a new boot log automatically generated every time you restart Windows? Yes it is  you just need to know the trick. (A tip of the hat to MS-MVP Sky King, who provided a critical clue in initially figuring all this out.)

You have to edit the C:\MSDOS.SYS file on your computer.

MSDOS.SYS is a hidden, read-only, system file, so, before you can edit it, you have to change its attributes to read-write. To do this, right-click on its icon in Explorer, select Properties, and remove the checkmark from in front of Read-Only. When you are through with all of your edits and changes in MSDOS.SYS (as described below), reverse the process and make sure that the read-only, hidden, and system boxes are all checked.

Though the changes suggested below are pretty innocent, if you are not familiar with editing MSDOS.SYS you might want to back it up first. Just copy it somewhere else. This saves a lot of headache if things go wrong.

Edit MSDOS.SYS with Notepad, the MS-DOS Edit program, or another editor. (TIP: I have all .SYS files set up to open automatically with Notepad  meaning I can actually just type MSDOS.SYS in a Run box and have it open. This never gets in my way. If you want to do the same thing, just click on the files icon, check the box to always open it with the same program, and pick Notepad from the list. Otherwise, if you dont want to make this permanent association change, just launch the Notepad program and use Open to open MSDOS.SYS.)

Once inside of MSDOS.SYS, there is one very important practical thing to note. You will see rows of Xs. Do not disturb these! They are there for a very important reason. The file must be at least a certain minimum size, or it will not be able to do its job right. You can edit things above and below the Xs, but dont mess with the Xs themselves.

ADD THE FOUR LINES GIVEN BELOW TO MSDOS.SYS. You can just add them to the bottom if you want; or, if other versions of some of these lines exist earlier, you can edit those, or add these lines next to them, or delete the earlier version and add these at the bottom. I do not think it matters one way or the other for any of them. Here are the lines:


Line 1 guarantees that the Boot Menu comes up every time. Line 2 says the Boot Menu should always take option 2, which is to create a boot log. Line 4 may not be needed, but was recommended, and may be needed on some systems according to some peoples reports (or it may just be a precaution in case you had a DisableLog=1 that you missed earlier in the file). It disables the disabling of the boot log.

Line 3 is the key one, and has advantages and disadvantages. I could not get the forced selecting of option 2 to work until I guaranteed that the Boot Menu was up for some period of time. BootMenuDelay=1 says that the Boot Menu will appear and wait for 1 second. This is the minimum. I set it at the minimum so it would not slow down my startup. You have to have at least 1 second here. But the disadvantage is that, if you want to manually bring up the Boot Menu for some other reason, you only have 1 second to pick the right number when the menu pops up, and that usually is not enough time. So you might want to set it a little higher, say, at 5 seconds, or whatever you want  just knowing that this adds 5 seconds to your startup time.

All of the above, also, will slightly slow down startup. Again, we are talking only a few seconds. I believe this is only true when a BOOTLOG.TXT or BOOTLOG.PRV already exists, and the slowdown is not in the forming of the boot log, but in the brief processes of deleting the existing .PRV file and backing up the existing BOOTLOG.TXT file before opening the new boot log.

After you have the boot log formed, what can you do with it? Much can be learned from studying it as is. But for most purposes, it will be much more comprehensible if you use the wonderful free utility Bootlog Analyser, which you can download here. http://www.vision4.dial.pipex.com/files/bla.zip

article taken from: http://www.aumha.org/a/bootlog.php


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now