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

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

  1. 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 does not work here. The drive letter is always the next free letter (E here) but I set it to H for test.:(


     
    • Agree Agree x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,263
    Likes Received:
    6,216
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,221 / 9
    Home Country:
    France France
    Show System Specs
    Hi,

    Just tested again and it's the same, i try to find the correct command from PS cmd directly because it seems to not work here.
    But didn't you test the rework for select the letter from MP config, it seems ok on my side and enable/disabled item too when change from native to other selection.
    So we can store an non used Letter and next will be to find the correct command to force to set the drive from MP.

    Here can be usefull but github project are no longer existant, i didn't search a lot if the code has moved to another repo lol
     
  4. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,263
    Likes Received:
    6,216
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,221 / 9
    Home Country:
    France France
    Show System Specs
    No way to force to use fixed letter drive, i succeed to make it work from powershell but don't succeed to port to C# lol.
    So i have let the selection to MP config for now and back the old way and it seems but i need to test more than using that code :

    Code (C):
    1.         using (var ps = PowerShell.Create())
    2.         {
    3.           // Set mounted ISO file to be able to unmount it if something failed to load.
    4.           _MountedIsoFile = IsoFile;
    5.           Log.Debug("Mount-DiskImage {0}", IsoFile);
    6.           ps.AddCommand("Mount-DiskImage").AddParameter("ImagePath", IsoFile).AddParameter("PassThru");
    7.           Log.Debug("Mount-DiskImage Result {0}", psResult.Count);
    8.         }
    9.  
    10.         using (var ps = PowerShell.Create())
    11.         {
    12.           ps.AddCommand("Get-DiskImage").AddParameter("ImagePath", IsoFile).AddCommand("Get-Volume");
    13.           var psResult = ps.Invoke();
    14.           Log.Debug("Mount-DiskImage Result {0}", psResult.Count);
    15.           foreach (var driveLetter in psResult.Select(result => result.Members["DriveLetter"].Value.ToString()))
    16.           {
    17.             _Drive = String.Format("{0}:", driveLetter);
    18.             Log.Debug("Mount-DiskImage DriveLetter {0}", _Drive);
    19.           }
    20.         }
    The newest letter drive is always get (result.count = 1).
    But i fear it's timing issue and then it will failed one day to another or one minute to another lol
    Attached is the modified file.

    The first i mount the iso and the second i ask from driveletter, when i use all ps.command in one, sometimes (most of the time), i didn't get result but doing that twice ps.addcommand and it seems to work better.

    Otherwise the powershell command used to change drive letter :

    $drive = Get-WmiObject -Class win32_volume -Filter "DriveLetter = 'e:'"
    Set-WmiInstance -input $drive -Arguments @{DriveLetter="O:"; Label="Label"}

    We really need to have this syntax : -Filter "DriveLetter = 'e:'" -> 'e:' is the current mounted drive
    And i change it to O: by -Arguments @{DriveLetter="O:"; Label="Label"}

    :p

    Edit : re-uploaded the zip.
     

    Attached Files:

    Last edited: September 27, 2015
    • Like Like x 1
  5. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,263
    Likes Received:
    6,216
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,221 / 9
    Home Country:
    France France
    Show System Specs
    Right now i have done multiple test and ISO always mount and on both PC (where it failed before).
    I will push the change and let MP config if we can found to fix a letter :)
     
    • Like Like x 1
  6. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,263
    Likes Received:
    6,216
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,221 / 9
    Home Country:
    France France
    Show System Specs
    So for now, when mount failed (i trigger it manually for purpose) the mounted drive is removed.
    Mounted drive is working for me right now, i will test more :)
    Thanks :)
     
  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
    Hi Seb!

    Are you sure if you need double check of the DriveType here?

    And there are a dismount here and here? Why?
     
    • Like Like x 1
  8. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,263
    Likes Received:
    6,216
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,221 / 9
    Home Country:
    France France
    Show System Specs
    Yep needed on my side and no clue why. (I have retry again last night and all was ok but need twice command).
    The unmount is needed if previous mount was done but no letter associate/detected so we need to unmount it.
     
  9. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,263
    Likes Received:
    6,216
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,221 / 9
    Home Country:
    France France
    Show System Specs
    Looking the code again and the first unmount is maybe not needed after all. I need to confirm that but I'm at work ;)
     
  10. 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
    The 1st need for Deamon tools or Virtual Clone Drive.
     
    • Like Like x 1
  11. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,263
    Likes Received:
    6,216
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,221 / 9
    Home Country:
    France France
    Show System Specs
    So need both :)
     
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!