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?
2 Answers
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
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?
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.– mosesddCommented Jul 25, 2017 at 14:01
-
-
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.– mosesddCommented Jul 25, 2017 at 14:39