Determine current boot.ini partition booted into

S

siliconpi

Hi,

I need to determine which boot.ini setting the user chose when
selecting entries at the boot screen. My boot.ini reads as:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003,
Enterprise" /fastdetect

If the user chooses Windows Server 2003, how do I determine that fact
exactly?

I need to modify this entry (in boot.ini) later on. (I'm trying to
build a tool that renames the current systemdrive entry in boot.ini to
something more descriptive than the above - ie, what the user
chooses).

Thanks!
 
B

Billy

siliconpi said:
Hi,

I need to determine which boot.ini setting the user chose when
selecting entries at the boot screen. My boot.ini reads as:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]

Partition 2 is the default and will load XP Pro
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003,
Enterprise" /fastdetect

If the user chooses Windows Server 2003, how do I determine that fact
exactly?

I need to modify this entry (in boot.ini) later on. (I'm trying to
build a tool that renames the current systemdrive entry in boot.ini to
something more descriptive than the above - ie, what the user
chooses).

Thanks!


You may edit the boot.ini file and change the words within the " " to
anything you desire.
Example
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Pick This One" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Server Only" /fastdetect

If you do not want others loading the Server, try setting the timeout to
1 or 2 seconds and leave the default as XP Pro. You will need to be
ready to hit the down arrow key at the right time to select the Server.
 
R

Ricardo M. Urbano - W2K/NT4 MVP

siliconpi said:
Hi,

I need to determine which boot.ini setting the user chose when
selecting entries at the boot screen. My boot.ini reads as:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003,
Enterprise" /fastdetect

If the user chooses Windows Server 2003, how do I determine that fact
exactly?

I need to modify this entry (in boot.ini) later on. (I'm trying to
build a tool that renames the current systemdrive entry in boot.ini to
something more descriptive than the above - ie, what the user
chooses).

Thanks!

I'm not exactly sure I understand what you are trying to accomplish, but
the environment variable, %SystemDrive%, contains the boot volume drive
letter, IOW, the drive letter that NTx is installed to.

hth
 
S

siliconpi

Sorry for not being clear. Here's the background. In our testing we
have machines with several of the same OSes on them. So on boot up,
the user is presented with a screen like:

Microsoft Windows XP Professional
Microsoft Windows XP Professional
Microsoft Windows XP Professional
Microsoft Windows XP Professional

Which isn't very helpful.

What i'm trying to achieve is that - when the user selects one of
these and boots into that OS.. he can then examine the system and see
"oh this is the Windows XP with Office in it" and then run a tool:

RenameBootEntry "WinXP with office"

Which renames the APPROPRIATE boot.ini entry with this text.

I'm okay with writing a VBS/WBS script or some batch scripting... that
would be the simplest way of handling it. This tool will only be run
on Win2000*, WinXP* and Win2003 Server*

Thanks!


Ricardo M. Urbano - W2K/NT4 MVP said:
siliconpi said:
Hi,

I need to determine which boot.ini setting the user chose when
selecting entries at the boot screen. My boot.ini reads as:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003,
Enterprise" /fastdetect

If the user chooses Windows Server 2003, how do I determine that fact
exactly?

I need to modify this entry (in boot.ini) later on. (I'm trying to
build a tool that renames the current systemdrive entry in boot.ini to
something more descriptive than the above - ie, what the user
chooses).

Thanks!

I'm not exactly sure I understand what you are trying to accomplish, but
the environment variable, %SystemDrive%, contains the boot volume drive
letter, IOW, the drive letter that NTx is installed to.

hth
 
B

Billy

I repeat.
Use the hidden boot.ini file and edit with any text editor (notepad will
do). You may change the part with in the parenthesis. See above post. No
program needed.

siliconpi said:
Sorry for not being clear. Here's the background. In our testing we
have machines with several of the same OSes on them. So on boot up,
the user is presented with a screen like:

Microsoft Windows XP Professional
Microsoft Windows XP Professional
Microsoft Windows XP Professional
Microsoft Windows XP Professional

Which isn't very helpful.

What i'm trying to achieve is that - when the user selects one of
these and boots into that OS.. he can then examine the system and see
"oh this is the Windows XP with Office in it" and then run a tool:

RenameBootEntry "WinXP with office"

Which renames the APPROPRIATE boot.ini entry with this text.

I'm okay with writing a VBS/WBS script or some batch scripting... that
would be the simplest way of handling it. This tool will only be run
on Win2000*, WinXP* and Win2003 Server*

Thanks!


"Ricardo M. Urbano - W2K/NT4 MVP" <[email protected]> wrote
in message news: said:
siliconpi said:
Hi,

I need to determine which boot.ini setting the user chose when
selecting entries at the boot screen. My boot.ini reads as:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003,
Enterprise" /fastdetect

If the user chooses Windows Server 2003, how do I determine that fact
exactly?

I need to modify this entry (in boot.ini) later on. (I'm trying to
build a tool that renames the current systemdrive entry in boot.ini to
something more descriptive than the above - ie, what the user
chooses).

Thanks!

I'm not exactly sure I understand what you are trying to accomplish, but
the environment variable, %SystemDrive%, contains the boot volume drive
letter, IOW, the drive letter that NTx is installed to.

hth
 
S

siliconpi

Hi Billy,

I'm trying to build a program that will do this for me. The reason is
that within our company, we have a lot of test machines where people
have installed these OSes. Now, if someone else comes along and looks
at this startup screen - he's going to be confused as to which OS
containing the customization he needs...

I do need to write a program that can do this for me. By having this
in place, I can quickly rename the boot partition without worrying
about what boot.ini entry I selected at the time of bootup. Trust me,
when you've seen 14-15 machines, all like this, you'll have no clue as
to what entry you selected at boot up...

Thanks.

Billy said:
I repeat.
Use the hidden boot.ini file and edit with any text editor (notepad will
do). You may change the part with in the parenthesis. See above post. No
program needed.

siliconpi said:
Sorry for not being clear. Here's the background. In our testing we
have machines with several of the same OSes on them. So on boot up,
the user is presented with a screen like:

Microsoft Windows XP Professional
Microsoft Windows XP Professional
Microsoft Windows XP Professional
Microsoft Windows XP Professional

Which isn't very helpful.

What i'm trying to achieve is that - when the user selects one of
these and boots into that OS.. he can then examine the system and see
"oh this is the Windows XP with Office in it" and then run a tool:

RenameBootEntry "WinXP with office"

Which renames the APPROPRIATE boot.ini entry with this text.

I'm okay with writing a VBS/WBS script or some batch scripting... that
would be the simplest way of handling it. This tool will only be run
on Win2000*, WinXP* and Win2003 Server*

Thanks!


"Ricardo M. Urbano - W2K/NT4 MVP" <[email protected]> wrote
in message news: said:
siliconpi wrote:

Hi,

I need to determine which boot.ini setting the user chose when
selecting entries at the boot screen. My boot.ini reads as:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003,
Enterprise" /fastdetect

If the user chooses Windows Server 2003, how do I determine that fact
exactly?

I need to modify this entry (in boot.ini) later on. (I'm trying to
build a tool that renames the current systemdrive entry in boot.ini to
something more descriptive than the above - ie, what the user
chooses).

Thanks!

I'm not exactly sure I understand what you are trying to accomplish, but
the environment variable, %SystemDrive%, contains the boot volume drive
letter, IOW, the drive letter that NTx is installed to.

hth
 
R

Ricardo M. Urbano - W2K/NT4 MVP

siliconpi said:
Hi Billy,

I'm trying to build a program that will do this for me. The reason is
that within our company, we have a lot of test machines where people
have installed these OSes. Now, if someone else comes along and looks
at this startup screen - he's going to be confused as to which OS
containing the customization he needs...

I do need to write a program that can do this for me. By having this
in place, I can quickly rename the boot partition without worrying
about what boot.ini entry I selected at the time of bootup. Trust me,
when you've seen 14-15 machines, all like this, you'll have no clue as
to what entry you selected at boot up...

Thanks.

Billy said:
I repeat.
Use the hidden boot.ini file and edit with any text editor (notepad will
do). You may change the part with in the parenthesis. See above post. No
program needed.

siliconpi said:
Sorry for not being clear. Here's the background. In our testing we
have machines with several of the same OSes on them. So on boot up,
the user is presented with a screen like:

Microsoft Windows XP Professional
Microsoft Windows XP Professional
Microsoft Windows XP Professional
Microsoft Windows XP Professional

Which isn't very helpful.

What i'm trying to achieve is that - when the user selects one of
these and boots into that OS.. he can then examine the system and see
"oh this is the Windows XP with Office in it" and then run a tool:

RenameBootEntry "WinXP with office"

Which renames the APPROPRIATE boot.ini entry with this text.

I'm okay with writing a VBS/WBS script or some batch scripting... that
would be the simplest way of handling it. This tool will only be run
on Win2000*, WinXP* and Win2003 Server*

Thanks!


"Ricardo M. Urbano - W2K/NT4 MVP" <[email protected]> wrote
in message news: said:
siliconpi wrote:

Hi,

I need to determine which boot.ini setting the user chose when
selecting entries at the boot screen. My boot.ini reads as:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003,
Enterprise" /fastdetect

If the user chooses Windows Server 2003, how do I determine that fact
exactly?

I need to modify this entry (in boot.ini) later on. (I'm trying to
build a tool that renames the current systemdrive entry in boot.ini to
something more descriptive than the above - ie, what the user
chooses).

Thanks!

I'm not exactly sure I understand what you are trying to accomplish, but
the environment variable, %SystemDrive%, contains the boot volume drive
letter, IOW, the drive letter that NTx is installed to.

hth

Hmmmm. OK, I understand now what you're trying to accomplish. I don't
know of anyway to determine the current "arc path", but that's what
you're looking for. Search the MS KB and the web, including
www.jsiinc.com/reghack for "arc path". There might be a 3rd party or
share/freeware util out there that can help you out.

GL!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Boot.ini correction 1
Unusual boot problem 27
Server 2003 Boot problem 2
w2k doesnt keep boot.ini 3
change boot.ini 1
Boot.ini 1
How to configure boot.ini to dual-boot Win2k and Win98 1
Dual boot, correct boot.ini 4

Top