Determine current boot.ini partition booted into

Determine current boot.ini partition booted into

Post by siliconpiN » Sat, 04 Sep 2004 01:44:59


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!
 
 
 

Determine current boot.ini partition booted into

Post by Bill » Sat, 04 Sep 2004 02:10:08


Partition 2 is the default and will load XP Pro



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.

 
 
 

Determine current boot.ini partition booted into

Post by Ricardo M. » Sat, 04 Sep 2004 04:10:36


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
--
Ricardo M. Urbano
Microsoft Windows 2000/NT MVP
 
 
 

Determine current boot.ini partition booted into

Post by siliconpiN » Sat, 04 Sep 2004 14:00:28

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!
 
 
 

Determine current boot.ini partition booted into

Post by Bill » Sat, 04 Sep 2004 15:43:55

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.





fact
boot.ini to
but
drive
 
 
 

Determine current boot.ini partition booted into

Post by siliconpiN » Sat, 04 Sep 2004 23:06:14

i 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" < XXXX@XXXXX.COM > wrote in message news:<LoUZc.1637$ XXXX@XXXXX.COM >...
 
 
 

Determine current boot.ini partition booted into

Post by Ricardo M. » Thu, 09 Sep 2004 00:44:40

iliconpi wrote:

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!
--
Ricardo M. Urbano
Microsoft Windows 2000/NT MVP