devxlogo

Active Partitions Under NT with VB6

Active Partitions Under NT with VB6

Question:
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?

Answer:
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

C:=”MS-DOS”

You should also have a line starting with

Default=xxxxx

You merely need to change the Default line to

Default=C:

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.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist