[Help Us!] Windows native ISO support (1 Viewer)

regeszter

Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Hungary Hungary
    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 :)
    I does not work here. The drive letter is always the next free letter (E here) but I set it to H for test.:(
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    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
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    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:
            using (var ps = PowerShell.Create())
            {
              // Set mounted ISO file to be able to unmount it if something failed to load.
              _MountedIsoFile = IsoFile;
              Log.Debug("Mount-DiskImage {0}", IsoFile);
              ps.AddCommand("Mount-DiskImage").AddParameter("ImagePath", IsoFile).AddParameter("PassThru");
              Log.Debug("Mount-DiskImage Result {0}", psResult.Count);
            }
    
            using (var ps = PowerShell.Create())
            {
              ps.AddCommand("Get-DiskImage").AddParameter("ImagePath", IsoFile).AddCommand("Get-Volume");
              var psResult = ps.Invoke();
              Log.Debug("Mount-DiskImage Result {0}", psResult.Count);
              foreach (var driveLetter in psResult.Select(result => result.Members["DriveLetter"].Value.ToString()))
              {
                _Drive = String.Format("{0}:", driveLetter);
                Log.Debug("Mount-DiskImage DriveLetter {0}", _Drive);
              }
            }
    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.
     

    Attachments

    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    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 :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    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 :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    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.
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,433
    10,254
    France
    France France
    Country flag
    Looking the code again and the first unmount is maybe not needed after all. I need to confirm that but I'm at work ;)
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    vvulture Using Windows 10 MediaPortal 1 Talk 8
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    Dark Eyes Updated to Windows 10, now TVServer won't work Installation, configuration support 1
    rsbrux Operating System Win 10 vs. 8.1 Operating System 2
    M.Hulot Moving Pictures lässt sich nach Windows-Update nicht mehr öffnen Plugins & Erweiterungen 1
    O Analog Angel USB TV Tuner on Windows 7 Ultimate Newcomers Forum 7
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    R Problem with MP1 and WifiRemote Skins and Plugins Installer (MPEI) 8
    R Directx 9.0 June 2010 does not install on Windows 10 x64, ends up with weird failure / no debug file Installation, configuration support 0
    W windows 7 and mediaportal 1.22 and 1.23 installer problem General Support 2
    D [solved] Active Movie window General 2
    TLD Windows 10 1903 feature update General Support 3
    A Problem Windows 10 64 bit prof. Update auf Version 1903(gelöst) Installationsprobleme? 0
    T No TV after updating Windows 10 to latest Version 1903 / OS build 18362.175 (logs attached) General Support 2
    T Can Emprex 3009ARF III MCE Remote Control be used to toggle Fullscreen/Windowed mode?? Remotes 7
    P WMC on Windows 7 migrating to Media Portal on Windows 10 Newcomers Forum 5
    R [solved] Hide Windows 10 volume OSD Feature Requests 3
    F [solved] Mediaportal (1 oder 2) Installation mit Fehler bei DirectX9.0 unter Windows 10 Allgemeines Support- und Diskussionsforum 10
    HTPCSourcer [Rejected] Mouse movements and focus: Windows standards MediaPortal 2 3
    D [solved] HID remote for mp2 and w10 64 bit? using all tools: sony, cisco, homeworkx ng General 2
    Lehmden MP2 client for Windows 10 ARM, possible? Maybe an UWP version could do the trick... MediaPortal 2 11
    Rob Hexenmeister [solved] Latests Media Handler - Skinning an updating window or control Fanart Handler 26
    el Filou Is Windows Media Player still needed on Windows 10 ? MediaPortal 1 Talk 0
    A Enigma2 receiver channels on Windows PC with Media Portal help General Support 0
    W Playback stuttering after upgrade from MP1 on Windows 7 to MP2 on Windows 10 General 2
    Similar threads

























    Top Bottom