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:]
or
wizmo 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
Analyzing...
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:
@echo off
if [%1]==[] goto :EOF
for /f %%v in ('trid -ns -r:1 "%1" ^| find /c "(.NRG)"') do (
if [%%v]==[0] 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.
4@SEARAS: Don't delete tags willy-nilly. The OP must have added the "batch-file" tag for a reason. Clearly he wants to do all this at the command-line, since he explicitly mentions "enter[ing] the ISO name in DOS". – Karan – 2012-11-03T18:27:43.947
Mr. Karan is right, I am wanting to do all this in batch file. – Mohd. Ismail – 2012-11-03T18:40:01.663
I figured this out in PowerShell: http://superuser.com/questions/499264/how-can-i-mount-an-iso-via-powershell-programmatically/499265#499265 It's not a batch file, but it might help you if you want to tackle some PowerScript instead.
– Tanner Faulkner – 2012-11-04T03:31:13.887@r.tanner.f I found your thread just now through Google, while you commented here as well, I added the link of your post in my post hope you don't mind. :P – avirk – 2012-11-04T05:47:06.823
@Mohd.Ismail , then please add 5th punct to your question about BATCH file – Searush – 2012-11-04T10:57:57.047
@SEARAS: I just now added 1 more line for this, so people are not making any mistake. – Mohd. Ismail – 2012-11-04T15:01:19.917
@r.tanner.f: I am trying to write something on your answer but there is no comment box there like here. Mr. Karan and Mr. avirk was talking about this only I think - Powershell, that you are using. I have to install from somewhere? I am not knowing this powershell only some batch programs, so I will try to install and do testing with code you are putting in your answer. I am giving +1 to all god answer here. thank you. – Mohd. Ismail – 2012-11-04T15:17:24.907
@r.tanner.f: Sir, I am having 1 more question. You are giving 2 links in your answer, but they are saying it is for Windows Server 2012 only? I am getting windows 8, not this. it will work ok? – Mohd. Ismail – 2012-11-04T15:22:33.937
@Mohd.Ismail Works great on Windows 8, that just happens to be where Microsoft chose to document it. Most of the time you would use these commands when working with servers, that's what PowerShell is geared towards. Your typical user doesn't even open PowerShell, so Microsoft expects the GUI to be used instead. However the cmdlet update was included in Windows 8, it's just not reflected in documentation. – Tanner Faulkner – 2012-11-04T15:30:58.680