Automated entry to boot.ini?

  • Thread starter Thread starter ten.nigriv
  • Start date Start date
T

ten.nigriv

I would like to add an entry to boot.ini using bootcfg via batch file.

The major stumbling block could be some systems may be multi-boot.

How do I know which boot entry ID relates to that which is currently
running.

I cannot use any tools other than those which are default installed in
XP.
 
you may be better off use wscript which I belive is installed in most PC


batch file will need quite a bit of parsing with for loops
for /f "usebackq"...
advanced set syntax.
and some temp files

string parsing in batch is no fun
 
you may be better off use wscript which I belive is installed in most PC


batch file will need quite a bit of parsing with for loops
for /f "usebackq"...
advanced set syntax.
and some temp files

string parsing in batch is no fun
Thanks for the reply!

At present, the scripting method, whether through Windows NT Command
Script, VBScript, WMI, WMIC or any combination isn't my problem.

What I need is a guaranteed method of ensuring that the boot.ini entry I
am using as the basis of my addition is the one which was invoked for the
currently running OS.

The running OS isn't necessarily the one which is default. My initial
thought was to attempt to ascertain the partition number relating to the
%systemdrive%. However, if more than one hard drive is installed there
could conceivably be two Partition(1) entries, so I may have to ascertain
the disc containing the %systemdrive% too.

Any iseas, or would I be better off posting requests in VBS and or BATCH
newsgroups?
 
Back
Top