Mount ISO in Windows Sandbox


Ian

Administrator
Joined
Oct 27, 2013
Messages
1,641
Reaction score
563
Has anyone figured out a way to be able to mount ISO files within Windows 10 Sandbox mode?

I've got some software I want to test out in a "disposable" environment, but it comes as an ISO file. I can open it in other ways, but it would be much easier to mount it naively.

I get a "Sorry, there was a problem mounting the file" error when I try and use the default right click > mount option.
 
Ad

Advertisements

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,497
Reaction score
1,067
I have not tried this, but maybe ( and I stress maybe ) you could access it by creating a wsb configuration file for sandbox.
  • Mount ISO on main system and note the drive letter assigned
  • Then create the configuration file

    Example assuming mounted iso is Drive Letter Z

  • Code:
    <Configuration>
      <VGpu>Default</VGpu>
      <Networking>Default</Networking>
      <MappedFolders>
        <MappedFolder>
          <HostFolder>Z:\[ some directory in mounted iso you want to access ]</HostFolder>
          <ReadOnly>true</ReadOnly>
        </MappedFolder>
      </MappedFolders>
      <LogonCommand>
        <Command>explorer.exe C:\Users\WDAGUtilityAccount\Desktop\[ some directory in mounted iso you wanted to access ]</Command>
      </LogonCommand>
    </Configuration>
  • The Configuration file needs to be saved with .wsb extension and acts as a gateway from your computer to Sandbox

    More about this on the following Blog:

    https://techcommunity.microsoft.com/t5/Windows-Kernel-Internals/Windows-Sandbox-Config-Files/ba-p/354902
 
  • Like
Reactions: Ian

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,497
Reaction score
1,067
Forgot to explain the idea of sample.

If it works, what it would be doing is using Explorer.exe to mount a directory from your pre-mounted iso, to your Sandbox Desktop

You can also run scripts via Configuration, so perhaps that'd be a work-around too.

The only catch with these work-arounds is its consuming resources your Sandbox probably needs to run smoothly, and in a sense it breaks the whole concept of Sandbox being isolated from the main System.
 
  • Like
Reactions: Ian

Ian

Administrator
Joined
Oct 27, 2013
Messages
1,641
Reaction score
563
That's an interesting idea... I'm going to try this tomorrow and see if it works! Hadn't occurred to me to mount it within the main system and access it that way. Thanks @Regedit32!
 

Ian

Administrator
Joined
Oct 27, 2013
Messages
1,641
Reaction score
563
I couldn't get this to work, unfortunately. I just opened the ISO as an archive within the Sandbox for now. Here's the error I got with the .wsb config file:

Code:
---------------------------
Windows Sandbox
---------------------------
Windows Sandbox failed to start.

Error 0x80070057. The parameter is incorrect.


Would you like to submit feedback about this issue?
---------------------------
Yes   No  
---------------------------
I'll take a look at in in more detail at the weekend and see if I can get it working. :).
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,497
Reaction score
1,067
That's a shame.

I might use Feed back myself to encourage them to make this task simpler.
 
  • Like
Reactions: Ian
Ad

Advertisements

Joined
Nov 19, 2013
Messages
4,679
Reaction score
910
Not tried, but what if you Opened (mounted) the ISO on the computer and then copied the contents of the mount to the sandbox? Shooting in the dark, as I have never used the sandbox.
 
  • Like
Reactions: Ian

Ian

Administrator
Joined
Oct 27, 2013
Messages
1,641
Reaction score
563
Not tried, but what if you Opened (mounted) the ISO on the computer and then copied the contents of the mount to the sandbox? Shooting in the dark, as I have never used the sandbox.
Yep, that would work - but it's not as straight forward. Was hoping it could be mounted naively, as the master OS can do it :).
 
Ad

Advertisements

Joined
Oct 1, 2014
Messages
2,217
Reaction score
323
Could the size of the Sandbox space on the drive make any difference? I think I remember seeing a 5 GB partition created.

Otherwise, I am not real clear on what type of interaction a virtual desktop has with the system..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top