Is Windows 8 creating a new drive for every ISO? Or does it have one virtual drive to load all ISOs in?
Others have already answered this - Windows will create a new virtual drive to load each ISO you open simultaneously. What this means is, the second ISO you load (without ejecting the first one) will not replace the one already loaded, but will instead be assigned a different drive letter.
Some PCs use UltraISO to open ISOs. If I just enter the ISO name in DOS, it is loading in UltraISO. How can I load the ISO only in Windows 8 on all PCs, whether they have UltraISO or not?
Interesting question. I actually tried
explorer.exe Filename.iso with different ISO handlers/viewers/editors installed, and found that depending on the level of integration with the OS, the command either bypasses the associated program or doesn't. I'm still looking for a way to reliably open ISOs always using Windows itself, irrespective of any associated programs installed. Will be sure to update my answer if/when I figure it out.
How can I unload ISOs?
Still need to figure this out; will probably happen in conjunction with figuring out a reliable loading command as mentioned above.
Meanwhile you can try one of the following:
nircmdc cdrom open [drive:]
How can I know if a file is really an ISO?
I'm addressing this last because technically, it's the most difficult to achieve. Reliably identifying whether a badly named disc image (or any file for that matter) is actually an ISO or not is surprisingly hard to do. The closest I could get was by using the TrID File Identifier. If you download the Win32 version and the latest TrIDDefs package, extract them to the same folder and run the following command:
trid -ns -r:1 File.iso
you will see output like this:
TrID/32 - File Identifier v2.10 - (C) 2003-11 By M.Pontello
Definitions found: 4903
Collecting data from file: File.iso
49.4% (.NRG) Nero BurningROM CDImage (2048000/1)
Unfortunately, it seems for some reason ISOs are either identified by TrID as "null bytes" (if you remove the
-ns switch), or as "Nero BurningROM CDImage" if you specify the switch. I don't know about the former, but the latter is possibly because NRG disc images are quite similar to ISOs. If so, it would be difficult (or maybe even impossible) to distinguish between badly named NRGs and true ISOs (although if Windows 8 can load NRGs renamed as ISOs, it won't even matter). In any case, the following batch file will print out whether a file specified as an argument is an NRG/ISO or not:
if [%1]== goto :EOF
for /f %%v in ('trid -ns -r:1 "%1" ^| find /c "(.NRG)"') do (
if [%%v]== echo "%1" is not an NRG/ISO & goto :EOF
echo "%1" is an NRG/ISO
Alternately, what you can do is look at this problem from the opposite direction. Since Windows 8 can only load ISOs and VHDs, it would be a fairly reasonable assumption to make that any file not loaded doesn't fit the bill. Thus what you could do is try and load the supposed ISO (command for that still pending of course), then search for a known file in all disc drives (real and virtual, since I don't know how to distinguish between the two). Provided a file by that same name doesn't exist on a real disc that happens to be inserted at the same time, if the file search succeeds you can conclude that the ISO was successfully loaded and thus is either a true ISO or a badly named VHD. The code to search all disc drives for a specific file can be found in my answer here. (Phew, hope that makes sense!)
Finally, I would like to say that since there are probably new APIs in Windows 8 to load/eject ISOs and these may be exposed via .NET/PowerShell, it might be easier to accomplish all that you want via PowerShell. I can't help you out there since I'm no PS expect, but you should definitely look into it if using batch files is not an absolute necessity.