I have to tell you, you solved a problem for me (rebooting NT from VB), which I’ve been trying to figure out for months. Much thanks.
Now I can move on to the next part of the program, which I don’t know how to do. I’m hoping you can help me once again.
Here’s what I’m trying to do: I want to be able to put a small DOS partition on the drive with my NT partition (I’m using FAT for everything for now.) Then I want to be able (under NT) to programatically set the DOS partition active, tell NT to reboot, and have it boot off of the DOS partition.
Is this possible? I know utilities like Partition Magic will let you do all kinds of tricks (move, hide, etc.) under NT. But can it be done from Visual Basic?
Actually, this is easier than you might think. Look on your C: root directory for a read-only, system file called Boot.Ini. You should have a selection called
You should also have a line starting with
You merely need to change the Default line to
You can optionally save the original default, or keep two files (say, BootIni.NT and BootIni.DOS) and copy them back and forth to Boot.INI. Remember, in any case, to set the attributes of Boot.INI to Read/Write rather than Read-Only and toggle the System setting off.