July 7, 200422 yr ===========================First we'll need to acquire the FINDCD.EXE program. All it does is replace those nasty IF EXIST lines in most code. It also gets rid of those problems when ZIP drives are used as an error may be caused by those IF EXIST lines. Download FINDCD.EXE here.Now to the editing.Open up FINDCD.EXE in HEX Workshop and look for the line %c:\WIN51 (if you're using the linked FINDCD.EXE) or %c:\WIN98\SETUP.EXE (if it's the original FINDCD.EXE).You're looking for what's in RED. Click over to where the numbers are, and find the position that corresponds with the \ after the %c:start typing 0's. not O's, but ZERO's. This makes everything null. Type the zero's up till the next %. Don't 00 the %.Alrighty then. Pick a file at the root of your CD. I chose WIN51 as my CD also has Windows XP on it. If you had a CD.TXT file you could use that. Or you could create your own, so that each disk is unique like AIO1.txt if you have different version of the disk.Click over to the text side of the window. just after the %c: type \WIN51 and substitute WIN51 with your file, and be sure to include the file extension if there is one. Win51 doesn't have one, so I didn't. Also make sure that it's in ALL CAPS. I don't know if it really matters, but better safe then sorry.============================================What am I suppose to do with FINDCD.EXE after editing...? does anyone know?Thanks
July 7, 200422 yr Download FINDCD.EXE here.Well, I don't see a link in your post. *hehe*nasty IF EXIST linesReally so nasty? I think it's better to have some IF EXIST lines based on the internal capabilities of the system instead of introducing even one more, little tool; especially when one first has to edit that tool to make it work in the desired way. Btw: I use the FOR-command instead of several IF-lines. Looks pretty good, just one line, works like a charm and no extra tool needed.
July 7, 200422 yr Author Actually my question is how can I use it? Because in this site http://flyakite.msfnhosting.com/ it tells you to how to edit but there are no examples on how to us it...Thanks
July 7, 200422 yr you're supposed to drop it into your Win98/ME boot disc image.I wrote that btw. You should have also used QUOTE tags. It looks better, and shows you're quoting.And actually there are examples of how to use it. set CDROM=FOO23FINDCD.EXEif "%CDROM%"=="FOO23" goto QUITThat's how you use it.The IF EXIST lines, could cause problems with ZIP drives or the like if you don't have a disc in the drive.
July 16, 200422 yr Author you're supposed to drop it into your Win98/ME boot disc image.I wrote that btw. You should have also used QUOTE tags. It looks better, and shows you're quoting.And actually there are examples of how to use it. set CDROM=FOO23FINDCD.EXEif "%CDROM%"=="FOO23" goto QUITThat's how you use it.The IF EXIST lines, could cause problems with ZIP drives or the like if you don't have a disc in the drive.Actually the findcd.exe is not necessary..
July 16, 200422 yr And why is it bad to add one more, little tool? Windows' lack of "little tools" is what makes the monstrosity that is an unattended install necessary in the first place. In MacOS or UNIX/Linux the process is infinitely easier because they have a collection of little tools that do one thing very well, and the ability to effortlessly pass information between programs.That Windows lacks these things is why people have to write them. In *ix I could just do:CDROM=`echo list volume | diskpart | awk '/ROM/ {print $X}' | head -1`where X is whatever column the drive letter is in. That would set CDROM to the first CD drive, whether it's a CD-ROM or a DVD-ROM. I'm not familiar with all the variations of what diskpart can output, but changing "ROM" to a more comprehensive regular expression would certainly be simple.So, in conclusion, don't bemoan little tools. Little tools let you do stuff like that above, which Windows can't do out of the box. And it's certainly less "nasty" than 26 "IF EXIST" lines.Give me findcd.exe any day.
July 16, 200422 yr Hmm, looking into what findcd.exe actually does, it seems to only print out the drive letter of whatever drive the CD is actually in. That is, of course, functionally identical to %CD~0,2%, assuming the current working directory is somewhere on the CD-ROM. This still isn't a very reliable way to check, though, since there are perfectly normal processes that can break it. For example, it would be impossible to use /makelocalsource and have this still work. Also, if you're in a preinstallation environment %SystemDrive% will refer to the CD-ROM drive.
July 16, 200422 yr For example, it would be impossible to use /makelocalsource and have this still work. Also, if you're in a preinstallation environment %SystemDrive% will refer to the CD-ROM drive.Yes i agree, but most people here just want the CDROM location to create the RunOnce setup keys. They are normally installing apps from the CD.
July 16, 200422 yr yes....but I hate to tell both of you this....FINDCD.EXE DOES NOT WORK IN XP. It was meant SOLELY for the purpose of the Win98 Multiboot boot IMAGE.%CD~0,2% won't work there as the local directory would be the A: drive, breaking the script. IF EXIST could cause a problem with empty ZIP drives.
July 16, 200422 yr %CD~0,2% won't work there as the local directory would be the A: driveAh yes, this is really just for 2000/XP/Server2003 CD installs.
July 28, 200422 yr Try this script. It works for me...FINDCD.CMD---------------@for /f "Tokens=3" %%f IN ('"echo list volume|diskpart|find /i "rom""') do set cdrom=%%fFINDCD.CMD
Create an account or sign in to comment