[Help Us!] - Windows native ISO support | Page 3

Discussion in 'Area 51 - Testing Area' started by Helios61, September 18, 2015.

  1. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Yes, the 'AttachVirtualDisk' function is supported on Win 7, but not for mounting ISO images.

    The first line on the MSDN page says "Attaches a virtual hard disk (VHD) or CD or DVD image file (ISO)"


     
    • Agree Agree x 2
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    Just for confusing. I mounted the ISO with PowerShell API. :p
     
    • Like Like x 2
  4. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,257
    Likes Received:
    6,211
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,214 / 9
    Home Country:
    France France
    Show System Specs
    Hi,
    I have pushed some change because at first i wasn't able to build the branch. (using nuget to use the correct dll) ;)

    There is a fix also that @red5goahead detected here :
    https://forum.team-mediaportal.com/...-an-amd-video-card.132066/page-8#post-1153924

    I get some others issues, seems to be timing related (maybe impacted by anydvd or anti-virus) :
    Code didn't detect the newly mounted drive and then failed to open the ISO and when it happen, the unmount can't be done because drive letter is unknown from MP side.
    Opening the same ISO multiple times and i get random result lol.

    Not sure if we can use something else than PowerShell API or maybe force PowerShell API to use always the same drive.

    Thanks @regeszter :p
     
    Last edited: September 26, 2015
    • Like Like x 1
    • Thank You! Thank You! x 1
  5. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    There is no parameter which pass the drive letter to the API. We can only get the result using Get-Volume. :(

    Seb,

    can you upload a log when the mount is failed?
     
    Last edited: September 26, 2015
    • Like Like x 1
  6. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Can't you use Set-Volume after mounting to change to the desired drive letter?
     
    • Great Idea! Great Idea! x 2
    • Like Like x 1
  7. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    I will try. 100x Thanks. :)
     
    • Like Like x 1
    • Agree Agree x 1
  8. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,257
    Likes Received:
    6,211
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,214 / 9
    Home Country:
    France France
    Show System Specs
    Yep it's a really code idea, like it seems on my side to failed to get the return result of the mount (but the mouting is ok, i can see it in explorer) if we can force the drive letter right after the mounting when the drive letter set in config, we surely are good to go :)
     
  9. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,257
    Likes Received:
    6,211
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,214 / 9
    Home Country:
    France France
    Show System Specs
    It's seems that adding :

    Code (C):
    1.           ps.AddCommand("Mount-DiskImage")
    2.             .AddParameter("ImagePath", IsoFile)
    3.             .AddParameter("PassThru")
    4.             .AddCommand("Set-Volume").AddParameter("DriveLetter", "M");
    And it works, the drive is set to M for testing and ISO seems to always mounted to M:
     
    • Like Like x 1
  10. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,257
    Likes Received:
    6,211
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,214 / 9
    Home Country:
    France France
    Show System Specs
    Ok, it seems to work :

    Code (C):
    1. using (var ps = PowerShell.Create())
    2.         {
    3.           Log.Debug("Mount-DiskImage {0}", IsoFile);
    4.           ps.AddCommand("Mount-DiskImage")
    5.             .AddParameter("ImagePath", IsoFile)
    6.             .AddParameter("PassThru")
    7.             .AddCommand("Set-Volume").AddParameter("DriveLetter", _Drive.Remove(_Drive.Length - 1));
    8.           ps.Invoke();
    9.           Log.Debug("Mount-DiskImage DriveLetter {0}", _Drive);
    10.         }
    I will test more later :) need to go to bed lol
     
    • Like Like x 1
  11. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,257
    Likes Received:
    6,211
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,214 / 9
    Home Country:
    France France
    Show System Specs
    Finally, i have push the change, need to be tested, i have modified MP config to be able to set a drive letter not used by windows.
    Will see what happen :)
     
    • Like Like x 2
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!