Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Here we go:
I am having a custom bootable disk, where I need all the stuff and path only to the Ramdrive. Now, the Ramdrive contains an archive (cab) of my software, which contains a batch file named same as the batch file, which is used to extract the archive. So, the problem is, that after extracting the archive files, the calling bat file gets overwritten, thus prevents it from executing rest of the commands. How to deal with it?
OK, I describe it in a more gentleman way:
1. I am using DOS 7.1, where after booting, I get an archive of my software in the Ramdrive. Archive name is Soft.cab.
2. The file to extract that archive is S.bat, which extract all the contents of the archive to the root of Ramdrive. It also has some important commands after doing the extraction job.
3. The archive contains a file named S.bat (to run that software). So, right after executing the extraction command, the S.bat gets overwritten, (which is instructed to overwrite obviously) so, after getting deleted, it doesn't process rest of the commands.
4. I don't care even about the deletion of the first S.bat, infact, I want it to be deleted, and give place for the second S.bat. But it should be deleted after executing all of the commands.
5. I can't change the name of either of the batch file (It's important as per the setup), nor change the path. And, the commands order is a serial order to be followed.
So the question is, is there any way to load the batch file as "Whole" in the memory, not one by one of commands? As, if it will load itself completely in memory, then even after deleting it from the disk, it will keep doing it's job.
It may sound like a very theoritical kind of question, but it's bugging me practically. :-(

no, but you can append the contents of the two "s.bat" together, such that the extraction part goes first before "run software".
copy this new s.bat to your archive/bootdisk. when it overwrites itself, it still continues where it left becauseit has the same contents.

Hi
Thanks for your prompt help. But, as I will join both bat files, and put both them in the archive/bootdisk, the every subsequent time I will run S.bat (after the first initial run), it will always perform the extraction first, then run the software. Which will take un-necessary delay each time when run (And will defeat the sole purpose of this whole race, Convinience).
Any more ideas?

you only need to call it once, to start the extraction. after extraction, it will overwrite itself, but because it has the same contents, it will continue from the point where it overwrote itself.

Put 'em in different directories.
=====================================
If at first you don't succeed, you're about average.M2

Hey Mechanix,
If the putting 'em into different directories would have been one of my options, I would have done that in the very primary stage, without bothering you guys. ;-)And Tik,
It seems I couldn't explain myself very well about your appending option. I just don't need to run the S.bat only once, but a few more times. It's like, when I am done with the software once, I would want to launch that again, then exiting, then launch. So, if the second S.bat file will also contain the "Extraction" command (as it must contain to be the same with the first S.bat), it will un-necessarily try to extract the already existed files. Thus, you have an unusual delay.So, is there any trick left to beat it up? :-(

check if a significant file or folder already exists. if so, skip extraction and proceed to running the software.
why do they have to have the same filename in the first place?

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |