Loading and unloading ISO files in Windows 8

9,808

Solution 1

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.

Solution 2

Is Windows 8 creating a new drive for every ISO? Or does it have one fake drive to load all ISOS in?

Yes Windows 8 will make a virtual drive itself for the every ISO file but only if you try to open the more than one ISO file at the same time.

enter image description here

How can I know if a file is really an ISO inside?

Just right click on the image and select the properties you will see the file type. Or it has a default icon in the Windows 8.

enter image description here

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?

Yes you can open it using the Open With option or set the default program to it.

enter image description here

How can I unload ISOs?

Just right click on it and select the option Eject.

enter image description here

Edit: You can run the ISO fire through the command line just type the command like below

 C:\>explorer.exe D:\DiskImage\imagefile.iso

Note: Here D:\diskimage\imagefile.iso is the path of the ISO file you have to change it with your path.

Now you will see that now ISO image is mounted in the the explorer and you can see it under "My Computer" section. If you want to more than one ISO at the same time then you can run the same command with the desired image file name to open it.

Now if you want to dismount the ISO image form command line then type the following command and hit Enter:

c:\>powershell dismount-diskimage -devicepath \\.\D:

here D: is referring the drive letter of your virtual drive it may be differ according to your partition letters.

One more Edit: After Googling a bit more I found the thread on SU by @r.tanner.f who find the way for mount the multiple ISOs through the power-shell. He overcome on this after reading this thread.

Solution 3

Is Windows 8 creating a new drive for every ISO? Or does it have one fake drive to load all ISOS in?

When you open an ISO with Windows Explorer for the first time, it automatically makes a new virtual drive for it ('mounts' it). If you open multiple ISOs, you will have multiple virtual drives.

How can I know if a file is really an ISO inside?

I'm not sure I follow. It appears as a virtual CD/DVD drive. You can check the properties of the drive for the File System used, I suppose.

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?

You can run explorer YourISOName.iso from a command prompt to open the ISO in Windows Explorer. If it's not mounted already, it will be, and you'll be taken there in Explorer.

How can I unload ISOs?

From Explorer you can right-click and 'Eject' them, just like any other external drive type in Windows.

Solution 4

This, it turns out, is how you can natively let Windows/explorer mount/unmount iso images regardless of the content type association.

Mounting an image:

$ powershell Mount-DiskImage -ImagePath d:\path\to\image.iso

Unmounting or DisMounting if you prefer:

$ powershell DisMount-DiskImage -ImagePath d:\path\to\image.iso 

nJoy!

Share:
9,808

Related videos on Youtube

Mohd. Ismail
Author by

Mohd. Ismail

Updated on September 18, 2022

Comments

  • Mohd. Ismail
    Mohd. Ismail almost 2 years

    I saw on one site that the new Windows 8 could load ISO images without the help of other programs.

    1. Is Windows 8 creating a new drive for every ISO? Or does it have one virtual drive to load all ISOs in?

    2. How can I know if a file is really an ISO?

    3. 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?

    4. How can I unload ISOs?

    I want to do all this in a batch file.

    • Mohd. Ismail
      Mohd. Ismail over 11 years
      Mr. Karan is right, I am wanting to do all this in batch file.
    • rtf
      rtf over 11 years
      I figured this out in PowerShell: superuser.com/questions/499264/… It's not a batch file, but it might help you if you want to tackle some PowerScript instead.
    • avirk
      avirk over 11 years
      @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
    • Searush
      Searush over 11 years
      @Mohd.Ismail , then please add 5th punct to your question about BATCH file
    • Mohd. Ismail
      Mohd. Ismail over 11 years
      @SEARAS: I just now added 1 more line for this, so people are not making any mistake.
    • Mohd. Ismail
      Mohd. Ismail over 11 years
      @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
      Mohd. Ismail over 11 years
      @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?
    • rtf
      rtf over 11 years
      @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.
  • Mohd. Ismail
    Mohd. Ismail over 11 years
    Thank you for answer. But someone remove one of my tag, so post is not clear as before. I am wanting to do all this in batch file, not from Explorer.
  • Mohd. Ismail
    Mohd. Ismail over 11 years
    How can I know if a file is really an ISO inside: means if I am having NRG or BIN or IMG or something file with name ISO, how to know if file is really ISO? becoz Windows 8 can only load ISO, yes? And explorer YourISOName.iso will open always in explorer and not in ultraiso? becoz if I double click iso, it is opening in ultra-iso. And how to eject from batch (someone delete my tag)?
  • Michael
    Michael over 11 years
    "How can I know if a file is really an ISO inside?" - The "Property Window" really says nothing about the content. Try to rename a "picture.png" to "picture.iso" and it will show you that its content is an ISO file. Windows is great. :)
  • Karan
    Karan over 11 years
    @Michael: Yeah, it's not really feasible for Windows to go digging inside every file to figure out what the content truly represents, else directory enumeration or even per file property display would take forever and you'd see the old magnifying glass animation for hours! Files also have no metadata attached to indicate their (true) type, so the OS assumes the extension is correct and behaves accordingly.
  • avirk
    avirk over 11 years
    @Mohd.Ismail Why do you want to do it through the batch file while you can do it easily through the GUI.
  • avirk
    avirk over 11 years
    @Michael I tried that with an UIF image and guess what it still show up the type of file is UIF not ISO.
  • avirk
    avirk over 11 years
    @Karan check out the edits.
  • avirk
    avirk over 11 years
    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. It only open the ISO file and if don't find the ISO file then it just open the explorer window nothing else. As I have associated .UIF file with MagicISO but when I tried to open it through explorer.exe drive:\image.uif then it just open the explorer.
  • avirk
    avirk over 11 years
    @Mohd.Ismail now you can create batch file using the Karan's suggestion and using the information provided by r.tanner.f, hope it helps.
  • Mohd. Ismail
    Mohd. Ismail over 11 years
    @avirk: I will use batch program for many things again and again, so Explorer method is not good for me. I am seeing now what Mr. r.tanner.f and Mr. Karan are saying.
  • Mohd. Ismail
    Mohd. Ismail over 11 years
    Thank you for long answer. I will try to understand it and use. it is looking good.
  • Mohd. Ismail
    Mohd. Ismail over 11 years
    This is great site, thank you everyone for very nice answer.
  • Karan
    Karan over 11 years
    @avirk: Edits look good (I made one small correction to the PS cmd), although ultimately it's not me but Mohd. Ismail who needs to judge what's best for him as per his needs.
  • avirk
    avirk over 11 years
    @Karan welcome for correction in my post, that was a little mistake which could mess the whole thing. And of course it depend on the OP what suits to him.
  • Karan
    Karan over 11 years
    Yup, what with all the answers here and the nice PS cmdlets discovered by r.tanner.f (I knew they must have added/exposed the new APIs somehow!), the OP has lots of great solutions to his query. That's why I love this site, so much to learn from (almost) everyone!
  • Karan
    Karan over 11 years
    @Mohd.Ismail: Ask if you have any further queries or cannot figure something out. The PowerShell commands specified here should make things much easier though IMO.
  • Kirk Liemohn
    Kirk Liemohn about 8 years
    I was looking at how to do this in Windows Server 2012 and this was helpful. Much better than having to download and install Virtual Clone Drive or some other 3rd party app.