Attempting to scan an ISO file

Sep 7, 2012 at 8:05 AM

I'm trying to open a large ISO file, its a download of the Windows WAIK for W7 which can be found here:

http://download.microsoft.com/download/8/E/9/8E9BBC64-E6F8-457C-9B8D-F6C9A16E6D6A/KB3AIK_EN.iso

This is my code

using (FileStream fs = new FileStream(waikIsoPath, FileMode.Open))
{
    CDReader cdr = new CDReader(fs, false);
    Stream s = cdr.OpenFile("Autorun.inf", FileMode.Open);
}

I can open the ISO using 7Zip and I know the root contains a file call Autorun.inf, however the above code causes a FileNotFoundException on the OpenFile line reporting "No such file".

Further, if I attempt to get the directories array from the cd root it is empty with a count of zero.

Any ideas?

Thanks

Chris.

Coordinator
Sep 8, 2012 at 10:43 AM

Hi Chris,

It's probably a dual ISO9660/UDF format, with no files in the ISO part - so the UdfReader class is probably what you need.

 

Regards,

Ken