Jump to content

auto-enter fdisk ?


vinifera

Recommended Posts

2 years ago I merged win98SE startup disc with winME installation so its auto-bootable ISO and all...

but my question is, is there a way via sort of script (bat or ini or whatever) that after startup disc load, it auto enters into fdisk ?

Edited by vinifera
Link to comment
Share on other sites


It can be done, but you would need to extract the Bootable Floppy Image from your .ISO, then open it with, say, WinImage, and then edit the files inside. It will contain AUTOEXEC.BAT, CONFIG.SYS, etc. When you're done editing, re-insert the image back into the .ISO.

I did something similar to this with my FIX95CPU project. The .ISO inside is bootable, and auto-boots into the FIX95CPU script.

Edited by LoneCrusader
Link to comment
Share on other sites

well, I'll need small help with this...

I've looked at autoexec.bat to see whats going on there

and this is my take, the RED is what I added

------------------------------------------------------

@ECHO OFF

set EXPAND=YES

SET DIRCMD=/O:N

set LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15

set LglDrv=%LglDrv% O 14 N 13 M 12 L 11 K 10 J 9 I 8 H 7 G 6 F 5 E 4 D 3 C

cls

call setramd.bat %LglDrv%

set temp=c:\

set tmp=c:\

path=%RAMD%:\;a:\;%CDROM%:\

copy command.com %RAMD%:\ > NUL

set comspec=%RAMD%:\command.com

copy extract.exe %RAMD%:\ > NUL

copy readme.txt %RAMD%:\ > NUL

copy fdisk.bat %RAMD%:\ > NUL

:ERROR

IF EXIST ebd.cab GOTO EXT

echo Please insert Windows ME Startup Disk 2

echo.

pause

GOTO ERROR

:EXT

%RAMD%:\extract /y /e /l %RAMD%: ebd.cab > NUL

echo The diagnostic tools were successfully loaded to drive %RAMD%.

echo.

IF "%config%"=="NOCD" GOTO QUIT

IF "%config%"=="HELP" GOTO HELP

LH %ramd%:\MSCDEX.EXE /D:mscd001 /L:%CDROM%

echo.

call fdisk.bat %RAMD%

GOTO QUIT

...

...

------------------------------------------------------

now the fdisk.bat that I put in ISO, only calls for fdisk.exe

so I used "call" function here as I see setup does it in beginning for something too :P

BUT nothing happens

the auto drive focus goes to A:\

and I see fdisk.bat isn't copied at all

any help in this ?

did I put things on wrong place or used wrong variables maybe ? :P

Edited by vinifera
Link to comment
Share on other sites

I am not sure to understand what you want to do.

Let's take just your two added lines:

copy fdisk.bat %RAMD%:\ > NUL

This copies file fdisk.bat ( that must be in current in ROOT of the floppy or in ROOT of the CD, since the PATH was defined a few lines earlier as "path=%RAMD%:\;a:\;%CDROM%:\", but the CDROM won't be available since you haven't yet loaded MSCDEX.EXE) to %RAMD%:\ (which letter should be assigned by an external batch setramd.bat

call fdisk.bat %RAMD%

This calls fdisk.bat (WHICH one, the one on the floppy or the one that should have been copied to %RAMD%? :unsure:) with as parameter %RAMD%, i.e. if the setramd.bat assigned to the RAMD variable the value of (say) R, you are effectively running

fdisk.bat R

WHAT are the exact contents of fdisk.bat?

The command fdisk does not in itself accept a drive letter parameter:

http://www.computerhope.com/fdiskhlp.htm

and if it did it would have probably wanted the colon.

But unless the fdisk.bat changes current directory the "current root" will remain the one where the autoexec.bat is, i.e. root of the floppy.

Maybe you want to have:

call %RAMD%:\fdisk.bat

:unsure:

But why are you using this additiona fdisk.bat?

Wouldn't it be more natural to remove the need to copy the fdisk.bat to the Ramdisk and then call it by simply having instead of the "call fdisk.bat %RAMD%" a more "direct":

%RAMD%:\fdisk.exe

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

thats the point, I don't know how those things function via autoexec

my wish is to when cd/iso boots and loads all things it needs

that I don't have to type fdisk myself, but that dos setup after all that primary stuff loading automatically kicks me into fdisk :)

as for fdisk.bat, it simply has "fdisk.exe" inside and I used call command since it doesnt call .exe but .bat only

I also removed my edits and added, yours of %RAMD%:\fdisk.exe

where my "call" was, but again nothing happens

Edited by vinifera
Link to comment
Share on other sites

Where you had put "copy fdisk.bat %RAMD%:\ > NUL" put instead "copy fdisk.exe" (and watch out for the message from copy, whether it is "1 file copied" or "file not found"), then, where you had put "call fdisk.bat %RAMD%" put instead just "fdisk". Test and report.

Link to comment
Share on other sites

vinifera

Start again from the autoexec.bat you posted.

What dencorso posted:

Where you had put "copy fdisk.bat %RAMD%:\ > NUL" put instead "copy fdisk.exe" (and watch out for the message from copy, whether it is "1 file copied" or "file not found"), then, where you had put "call fdisk.bat %RAMD%" put instead just "fdisk". Test and report.

Well, just after the line "copy fdisk.exe" , insert a new line with "pause". Those commands, of course, go into the batch without the qiotation marks.

What he meant:

Replace the line:

copy fdisk.bat %RAMD%:\ > NUL

with these two lines:

copy fdisk.exe %RAMD%:\ > NUL
PAUSE

Then (this was jaclaz meant) do change the line:

call fdisk.bat %RAMD%

to:

%RAMD%:\fdisk.exe

jaclaz

Link to comment
Share on other sites

nothing happens :/

NO :no: . Meaning that I do not believe you :w00t:or you did something "wrong" (or you failed to do something) :ph34r: .

It seems like the modified autoexec.bat is not run at all. :wacko:

Let's do it like this :), try describing in your words EXACTLY what you have done (the DETAILED procedure you used to modify the autoexec.bat and rebuild the image).

Then, still on the autoexec you posted, and modified as per my last post, replace:

@ECHO OFF

with:

REM @ECHO OFF

Then insert after the line:

%RAMD%:\fdisk.exe

a :

PAUSE

Then try again, and report what you see when the boot is initiated.

Additionally compress the WHOLE modified autoexec.bat to a .zip file and attach the file to yor next post.

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

It seems like the modified autoexec.bat is not run at all.

I have to agree, as again nothing happens

the modified autoexec, is ok, because when extraced out of image is same one I modify (same "code" is there)

I use rclick -> edit (notepad) to edit .bat

I use Power ISO to make/build images

I rebulid the image by simply drag and drop new file into opened image, then re-save the image, its still bootable and it does contain my modified autoexec.bat so it must be good

heres the bat file as you asked:

http://www15.zippyshare.com/v/97566816/file.html

I appreciate the help :)

Edited by vinifera
Link to comment
Share on other sites

I rebulid the image by simply drag and drop new file into opened image, then re-save the image, its still bootable and it does contain my modified autoexec.bat so it must be good

NOT really. :whistle:

Open the.iso image with 7-zip.

You should see a [bOOT] "folder".

Open it with 7-zip.

You should see a .img file, possibly Bootable_Floppy.img or something like that.

Open it with 7-zip.

Inside it you should see an AUTOEXEC.BAT, open it with Notepad or other text editor (press F4).

THAT is the AUTOEXEC.BAT that is actually running.

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...