1

I want to mount an ISO image silent to a specific drive letter on Windows 7, without installing third-party software. I tried with WinCDEmu Portable but it needs to be started with gui once to install the driver. Is there any way to get this done?

3

I found a solution. It is possible with OSFMount. After installed on a machine once, it's sufficient to copy OSFMount.com and OSFMount.sys from install dir to make it portable.

My batch script looks like this:

@echo off
set disk1=\\path\to\my\disk1.iso
set disk2=\\path\to\my\disk2.iso
set drive1=M:
set drive2=N:
.\OSFMount.com -a -t file -f %disk1% -m %drive1% 
.\OSFMount.com -a -t file -f %disk2% -m %drive2% 

%drive1%\setup.exe -silent -media_dir2 %drive2%

.\OSFMount.com -d -m %drive1%
.\OSFMount.com -d -m %drive2%
exit 0
  • I've added the WINCDEMU version aswell. use "set VAR=%~dp0" to find current BAT file location so u can do a "portable" variant of your script – dExIT Jul 25 '17 at 14:25
  • I will upvote yours, please upvote mine, and select which answer u see fit. – dExIT Jul 25 '17 at 14:25
1

Please check with WINCDEMU portable, save the below script as .CMD file or .BAT, and place it in your USB flash drive (because it is portable so I thought).

    @echo off
    sleep 5
    set iso1="PATH-TO-ISO"
    set iso2="PATH-TO-ISO"
    set emupath=%~dp0
cd %emupath%
    echo "Mounting ISO = %iso1%"
    batchmnt %iso1%
        echo "Mounted !!"
    ping 127.0.0.1 -n 6 > nul
    batchmnt %iso2%
pause

--- Win8 +

This is doable through : PowerShell Mount-DiskImage

$mountResult = Mount-DiskImage C:\myISO.iso -PassThru
$volumeiso = $mountResult | Get-Volume

Then you can start a explorer window

ii $volumeiso:\

Please see : How can I mount an ISO via PowerShell/programmatically?

And this : https://stackoverflow.com/questions/320509/is-it-possible-to-open-a-windows-explorer-window-from-powershell

If you want a concrete script/solution please specify what you wish to happen.

  • This works from Windows 8 but not in Windows 7. See here: technet.microsoft.com/de-de/library/hh848706(v=wps.630).aspx I want to create a script which automatically mounts two ISO files, starts an installation and unmounts the ISOs after that. – raz0r Jul 25 '17 at 14:01
  • I am updating the answer sorry i missed that ur on WIN7 – dExIT Jul 25 '17 at 14:05
  • With portable I meant 'no installation required', I want to rollout this script in my network so I don't want to install third-party software only for another software installation. When you download WinCDEmu Portable you don't have batchmnt, you only have PortableWinCDEmu-4.0.exe. – raz0r Jul 25 '17 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.