vinifera Posted July 23, 2012 Share Posted July 23, 2012 (edited) 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 July 23, 2012 by vinifera Link to comment Share on other sites More sharing options...
LoneCrusader Posted July 23, 2012 Share Posted July 23, 2012 (edited) 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 July 23, 2012 by LoneCrusader Link to comment Share on other sites More sharing options...
vinifera Posted July 23, 2012 Author Share Posted July 23, 2012 (edited) well, I'll need small help with this...I've looked at autoexec.bat to see whats going on thereand this is my take, the RED is what I added------------------------------------------------------@ECHO OFFset EXPAND=YESSET DIRCMD=/O:Nset LglDrv=27 * 26 Z 25 Y 24 X 23 W 22 V 21 U 20 T 19 S 18 R 17 Q 16 P 15set 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 Cclscall setramd.bat %LglDrv%set temp=c:\set tmp=c:\path=%RAMD%:\;a:\;%CDROM%:\copy command.com %RAMD%:\ > NULset comspec=%RAMD%:\command.comcopy extract.exe %RAMD%:\ > NULcopy readme.txt %RAMD%:\ > NULcopy fdisk.bat %RAMD%:\ > NUL:ERRORIF EXIST ebd.cab GOTO EXTecho Please insert Windows ME Startup Disk 2echo.pauseGOTO ERROR:EXT%RAMD%:\extract /y /e /l %RAMD%: ebd.cab > NULecho The diagnostic tools were successfully loaded to drive %RAMD%.echo.IF "%config%"=="NOCD" GOTO QUITIF "%config%"=="HELP" GOTO HELPLH %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.exeso I used "call" function here as I see setup does it in beginning for something too BUT nothing happensthe auto drive focus goes to A:\and I see fdisk.bat isn't copied at allany help in this ?did I put things on wrong place or used wrong variables maybe ? Edited July 23, 2012 by vinifera Link to comment Share on other sites More sharing options...
jaclaz Posted July 23, 2012 Share Posted July 23, 2012 (edited) I am not sure to understand what you want to do.Let's take just your two added lines:copy fdisk.bat %RAMD%:\ > NULThis 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.batcall fdisk.bat %RAMD%This calls fdisk.bat (WHICH one, the one on the floppy or the one that should have been copied to %RAMD%? ) 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 RWHAT are the exact contents of fdisk.bat?The command fdisk does not in itself accept a drive letter parameter:http://www.computerhope.com/fdiskhlp.htmand 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.batBut 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.exejaclaz Edited July 23, 2012 by jaclaz Link to comment Share on other sites More sharing options...
vinifera Posted July 23, 2012 Author Share Posted July 23, 2012 (edited) thats the point, I don't know how those things function via autoexecmy wish is to when cd/iso boots and loads all things it needsthat 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 onlyI also removed my edits and added, yours of %RAMD%:\fdisk.exewhere my "call" was, but again nothing happens Edited July 23, 2012 by vinifera Link to comment Share on other sites More sharing options...
dencorso Posted July 24, 2012 Share Posted July 24, 2012 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 More sharing options...
vinifera Posted July 24, 2012 Author Share Posted July 24, 2012 (edited) well since it reads from ISO, everything is pretty fast so I couldn't notice the message of copybut after all loads, nothing happens Edited July 24, 2012 by vinifera Link to comment Share on other sites More sharing options...
dencorso Posted July 24, 2012 Share Posted July 24, 2012 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. Link to comment Share on other sites More sharing options...
vinifera Posted July 24, 2012 Author Share Posted July 24, 2012 doesn't even trigger Link to comment Share on other sites More sharing options...
jaclaz Posted July 24, 2012 Share Posted July 24, 2012 viniferaStart 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%:\ > NULwith these two lines:copy fdisk.exe %RAMD%:\ > NULPAUSEThen (this was jaclaz meant) do change the line:call fdisk.bat %RAMD%to:%RAMD%:\fdisk.exejaclaz Link to comment Share on other sites More sharing options...
vinifera Posted July 24, 2012 Author Share Posted July 24, 2012 (edited) nothing happens :/ Edited July 24, 2012 by vinifera Link to comment Share on other sites More sharing options...
jaclaz Posted July 24, 2012 Share Posted July 24, 2012 (edited) nothing happens :/NO . Meaning that I do not believe you or you did something "wrong" (or you failed to do something) .It seems like the modified autoexec.bat is not run at all. 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 OFFwith:REM @ECHO OFFThen insert after the line:%RAMD%:\fdisk.exea :PAUSEThen 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 July 24, 2012 by jaclaz Link to comment Share on other sites More sharing options...
vinifera Posted July 24, 2012 Author Share Posted July 24, 2012 (edited) It seems like the modified autoexec.bat is not run at all.I have to agree, as again nothing happensthe 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 .batI use Power ISO to make/build imagesI 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 goodheres the bat file as you asked:http://www15.zippyshare.com/v/97566816/file.htmlI appreciate the help Edited July 24, 2012 by vinifera Link to comment Share on other sites More sharing options...
jaclaz Posted July 24, 2012 Share Posted July 24, 2012 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 goodNOT really. 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 More sharing options...
vinifera Posted July 24, 2012 Author Share Posted July 24, 2012 that explains it all !now question is how to put it back all without screwing anything ?(both files to .img and .img to iso)neither 7zip or PowerISO allows it Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now