Page 1 of 1

BOOTNOW.INI automated creation script

Posted: Fri Oct 04, 2013 8:26 pm
by tas3086
Do you use BOOTNOW on your system?

Do you have to change your bootnow.ini file every time your hardware changes, plug in a flash or other drive, or BOOTITBM selects a different bootable configuration? Here's a little utility script (BOOTTIME.TBS) that will create the correct bootnow.ini file on the system that you are currently running bootnow.exe or bootndos.exe. You should run bootnow immediately after using this script. ( you need to modify the script to select a base partition name on the drive where BOOTITBM exists. If you need to specify an extended partition name, let me know. It is an easy addition.)

(This has only been tested on WINDOWS, but should work on DOS. For Linux I believe that it needs to be run from the same location that contains bootnow.exe )

It seems to me that this would be a good -option addition to BOOTNOW. All you need to specify is a partition or EMBR name that references a partition for the hard drive that contains the BIBM code.

I was unable to add this as an attachment for some reason, so here is the script.

sub main()
if TBSENV = "LINUX" then
bfile="BOOTNOW.INI"
elseif TBSENV = "DOS" then
bfile="C:\BOOTNOW.INI"
elseif TBSENV = "WINDOWS" then
bfile="c:\windows\BOOTNOW.INI"
end if
getdrvltrinfo()
n=0
h=gethdinfo(n)
while h
pn=1
while h.partition[pn]
printl("HDNum:", h.num,"-",pn,"-",0," name:", pad(h.partition[pn].name,16)," id:", hex(h.partition[pn].id))
if a1 = h.partition[pn].name THEN
fpxx=hex(h.partition[pn].id)
fdxx=h.num
end if
if a2 = h.partition[pn].name THEN
tpxx=hex(h.partition[pn].id)
tdxx=h.num
end if
// //
// Set a partition/EMBR name that exists on the hard drive where BOOTIT exists //
// vvvvvvvvvvv //
if "WinXP(32)" = h.partition[pn].name THEN
// ^^^^^^^^^^^ //
afile=open(bfile,"in-out")
if afile= -1 then
printl ("Error writing file :"#afile.errno)
end if
// seek(afile,0)
printl (" :"#bfile#" is being created to reference this drive")
writel (afile,"[OPTIONS]")
writel (afile,"HD="#h.num)
close(afile)
end if
pn=pn+1
wend
n=n+1
h=gethdinfo(n)
wend
getdrvltrinfo(0)
End sub

Re: BOOTNOW.INI automated creation script

Posted: Sun Oct 06, 2013 11:04 pm
by TeraByte Support
Thanks - you could use the member PEFLAG of the partition to figure out
which partition is the active BootIt Partition (one of the bits will only be
set on for the BootIt partition, don't recall off the top of my head which
one).


"tas3086" wrote in message news:6485@public.scripting...

Do you use BOOTNOW on your system?

Do you have to change your bootnow.ini file every time your hardware
changes, plug in a flash or other drive, or BOOTITBM selects a different
bootable configuration? Here's a little utility script (BOOTTIME.TBS) that
will create the correct bootnow.ini file on the system that you are
currently running bootnow.exe or bootndos.exe. You should run bootnow
immediately after using this script. ( you need to modify the script to
select a base partition name on the drive where BOOTITBM exists. If you
need to specify an extended partition name, let me know. It is an easy
addition.)

(This has only been tested on WINDOWS, but should work on DOS. For Linux I
believe that it needs to be run from the same location that contains
bootnow.exe )

It seems to me that this would be a good -option addition to BOOTNOW. All
you need to specify is a partition or EMBR name that references a partition
for the hard drive that contains the BIBM code.

I was unable to add this as an attachment for some reason, so here is the
script.

sub main()
if TBSENV = "LINUX" then
bfile="BOOTNOW.INI"
elseif TBSENV = "DOS" then
bfile="C:\BOOTNOW.INI"
elseif TBSENV = "WINDOWS" then
bfile="c:\windows\BOOTNOW.INI"
end if
getdrvltrinfo()
n=0
h=gethdinfo(n)
while h
pn=1
while h.partition[pn]
printl("HDNum:", h.num,"-",pn,"-",0," name:", pad(h.partition[pn].name,16),"
id:", hex(h.partition[pn].id))
if a1 = h.partition[pn].name THEN
fpxx=hex(h.partition[pn].id)
fdxx=h.num
end if
if a2 = h.partition[pn].name THEN
tpxx=hex(h.partition[pn].id)
tdxx=h.num
end if
//
//
// Set a partition/EMBR name that exists on the hard drive where BOOTIT
exists //
// vvvvvvvvvvv
//
if "WinXP(32)" = h.partition[pn].name THEN
// ^^^^^^^^^^^
//
afile=open(bfile,"in-out")
if afile= -1 then
printl ("Error writing file :"#afile.errno)
end if
// seek(afile,0)
printl (" :"#bfile#" is being created to reference this
drive")
writel (afile,"[OPTIONS]")
writel (afile,"HD="#h.num)
close(afile)
end if
pn=pn+1
wend
n=n+1
h=gethdinfo(n)
wend
getdrvltrinfo(0)
End sub


Re: BOOTNOW.INI automated creation script

Posted: Mon Oct 07, 2013 6:28 am
by TeraByte Support(PP)
Should be bit 14.