PDA

View Full Version : Determine current boot.ini partition booted into


siliconpi
09-02-2004, 08:44 AM
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!

Billy
09-02-2004, 09:10 AM
"siliconpi" <siliconpiNOSPAM@hotpop.com> wrote in message
news:eb6ae965.0409020844.5e49f076@posting.google.com... 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.

Ricardo M. Urbano - W2K/NT4 MVP
09-02-2004, 11:10 AM
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
--
Ricardo M. Urbano
Microsoft Windows 2000/NT MVP

siliconpi
09-02-2004, 09:00 PM
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" <rmu1@columbiaSPAM.SUCKSedu> wrote in message news:<4137702C.6964CD57@columbiaSPAM.SUCKSedu>... 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

Billy
09-02-2004, 10:43 PM
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" <siliconpiNOSPAM@hotpop.com> wrote in message
news:eb6ae965.0409022100.1ec5f595@posting.google.com... 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" <rmu1@columbiaSPAM.SUCKSedu> wrote
in message news:<4137702C.6964CD57@columbiaSPAM.SUCKSedu>... 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

siliconpi
09-03-2004, 06:06 AM
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" <Noone@home.spamnet> wrote in message news:<LoUZc.1637$N4.462@newsread3.news.pas.earthlink.net>... 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" <siliconpiNOSPAM@hotpop.com> wrote in message news:eb6ae965.0409022100.1ec5f595@posting.google.com... 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" <rmu1@columbiaSPAM.SUCKSedu> wrote in message news:<4137702C.6964CD57@columbiaSPAM.SUCKSedu>... 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

Ricardo M. Urbano - W2K/NT4 MVP
09-07-2004, 07:44 AM
siliconpi wrote: 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" <Noone@home.spamnet> wrote in message news:<LoUZc.1637$N4.462@newsread3.news.pas.earthlink.net>... 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" <siliconpiNOSPAM@hotpop.com> wrote in message news:eb6ae965.0409022100.1ec5f595@posting.google.com... 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" <rmu1@columbiaSPAM.SUCKSedu> wrote in message news:<4137702C.6964CD57@columbiaSPAM.SUCKSedu>... > 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!
--
Ricardo M. Urbano
Microsoft Windows 2000/NT MVP


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service