1.

Solve : Re: need help to creat  a batch file or help me w?

Answer»

i can't understand a WORD of what you are saying, please type with points! i don't know when you sentaince ends or begins. And that menu, should it be in dos our should it be a exe file or something. By the way, what is your os? and please type these text whit points

WELL sorry if u were not able to understand let me try to explain again,

i MADE a multi boot cd with these options

1:boot with disk manager
2:boot with hdd regenerator
3:boot with disk tools
4:boot with seamap

now when i start my pc with cd rom support it boots from cd and show me this menu, so menu number 1 ,2 3 works fine but option number 4 dont work so in the menu i need to edit the line for a batch file like when i will press enter on choice number "4" it will run a batch file and the work of that batch file is to take pc on dos prompt and then load "seamap.exe" from this path seamap\seamap.exe
one more thing since this path is in cd like if letter of cd drive is d: then path is d:\seamap\seamap.exe and we need a flexiable drive letter cuz this cd will be used on MANY pc's so we dont know what drive letter that pc will have but main path is that as u open the cdrom then path is cdrom:\seamap\seamap.exe so this is what i was talking about all u need to tell me how to CREAT a batch file which will run and will open the seamap.exe from a subdirectory. i dont know nothing about batch file plz write the lines here for the batch file and i will save those lines in a batch file. for more information i am putting the menu here which was created by magic iso so u can understand it more better

:start
cls
print ----------------------------------------------------------------
print Multi-boot CD Main Menu
print ----------------------------------------------------------------
print
print
print
print 1:boot with disk manager
print 2:boot with hdd regenerator
print 3:boot with disk tools
print 4:boot with seamap
print
print Hit the key of choice:
print
print

:mainkey
getkey 20 esc
onkey 1 goto label_1
onkey 2 goto label_2
onkey 3 goto label_3
onkey 4 goto label_4
goto mainkey
:label_1
print 1:boot with disk manager
cd mboot
run 0.bin
getkey
goto start
:label_2
print 2:boot with hdd regenerator
cd mboot
run 1.bin
getkey
goto start
:label_3
print 3:boot with disk tools
cd mboot
run 2.bin
getkey
goto start
:label_4
print 4:boot with seamap
cd mboot
run 3.bin
getkey
goto start

now when i press choice "4" it will trigger the label_4 plz tell me how to put the path of that batch file in label_4 and then comes the batch file that how that batch file should be written to lead to dos prompt and then open the seamap.exe from this path cdrom:\seamap\seamap.exe

i hope u will be able to understand my problem now i will be looking for ur kind consideration take care huge different :d, now i could start reading and understand it btw what is your os? windows xp/98/nt ....hi well right now i using windows Xp pro SP2 but i want to know how to creat batch file which solve my problem to run an application from cdrom:\seamap\seamap.exe and i am still waiting for the help.just a suggestion
since you are using XP, you can check out the fsutil command
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil.mspx
u can loop through "fsutil fsinfo drives" command and issue
"fsinfo drivetype " to query for CD rom drive. Use "find" or something to grab "CD-ROM Drive" and assign the drive letter to a variable.

eg (NB , its not real code)
for %%a in ( fsutil fsinfo drives ) do
( fsutil fsinfo drivetype %%a | find "CD-ROM"
if errorlevel == set driveletter=%%a )

something like this..

there might be other ways to do it. this is what i can think of right now.

hi i guess u didnt read carefully about my problem i asked that i am running multi boot cd with cd rom support in dos and i need a batch file which take me to the dos prompt when enterd the desired choice from multiboot menu here i show u some thing
this is orignal code

print 4:boot with seamap
cd mboot
run 3.bin

now i will change it like this
print 4:boot with seamap
cd mboot
run abc.bat

or

print 4:boot with seamap
run abc.bat

but the problem is that i dont know how to make a batch file which take me to the dos prompt and then load the file from this path cdrom:\seamap\seamap.exe

i hope this will make u more clear, its all about to creat a batch fuile which should go to dos prompt and then load the file from a subdir plz kindly advise me now and write the code of that batch file here i am sure it will not be a big enough just few lines, i will be looking forward again for ur help thanks



Discussion

No Comment Found