Win HOW-TO Dynamically set default drive in PowerDVD 11 in a multi-drive setup
#1
Hi folks

Over the last few days I configured my Proof-of-Concept of an xbmc HTPC on a currently unused laptop before buying some dedicated hardware.

Precondition to my setting: I want to play all ISO content (DVD&Bluray) and physical discs (DVD&Bluray) with PowerDVD.

One of the things I stumbled upon was that PowerDVD 11 did not always open the DVDs automatically from physical drive D: or from the virtual drive E: (Virtual CloneDrive 5.4.5.0).

My PlayISO.bat file was configured like I found it on one of the other How-To guides, Working External Player Solution.

playercorefactory.xml:
Code:
<playercorefactory>
<players>
  <player name="Disc_Player" type="ExternalPlayer" audio="false" video="true">
   <filename>C:\Users\xbmc\AppData\Roaming\XBMC\userdata\PlayDisc.bat</filename>
   <args>"{1}" /fullscreen /close</args>
   <hidexbmc>false</hidexbmc>
   <hideconsole>true</hideconsole>
   <warpcursor>none</warpcursor>
  </player>
  <player name="ISO_Player" type="ExternalPlayer" audio="false" video="true">
   <filename>C:\Users\xbmc\AppData\Roaming\XBMC\userdata\PlayISO.bat</filename>
   <args>"{1}" /fullscreen /close</args>
   <hidexbmc>false</hidexbmc>
   <hideconsole>true</hideconsole>
   <warpcursor>none</warpcursor>
  </player>
</players>
<rules action="prepend">
  <rule video="true" player="Universal_Player">
   <rule filetypes="iso" player="ISO_Player"/>
   <rule protocol="bd|dvd" player="Disc_Player"/>>
  </rule>
</rules>
</playercorefactory>

PlayISO.bat:
Code:
@echo off
rem you can place your PlayISO file in \Roaming\XBMC\userdata\
rem you need to put the correct VCDMount drive letter in the command below

"C:\Program Files\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files\CyberLink\PowerDVD11\PDVDLaunchPolicy.exe" E:
rem "C:\Program Files\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u

PlayDisc.bat:
Code:
@echo off
rem you can place your PlayDisc file anywhere

"C:\Program Files\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
"C:\Program Files\CyberLink\PowerDVD11\PDVDLaunchPolicy.exe" D:

In my case, I had to comment the virtual disc unmounting line in PlayISO.bat, because the disc was already unloaded the moment PowerDVD was started. Maybe an misconfiguration on my side in the playercorefactory.xml, maybe hidexbmc or hideconsole can do the trick but i'm not sure. On the other hand, I added the virtual disc unmounting line in PlayDisc.bat, so I'm sure that there is only a disc in the physical drive, not in the virtual, and PowerDVD has only one movie to play. It works for me like this...

While testing, I found out that in my case the direct command line launch of PDVDLaunchPolicy.exe with a drive as option, e.g. PDVDLaunchPolicy.exe E: does not really work. Didn't find out why. It always takes the drive as default that was set as default in the program itself. So when I set E:\ as Default (in the settings of PowerDVD) and put a DVD in the drive, I have to wait a moment until Play Disk displays, then start, and... No disk in drive E:\ Confused. Vice versa when I have D:\ as default drive. Of course I can then change the drive (I have PowerDVD in Cinema Mode) and start the movie, but it annoyed me.

So I searched for the registry key that defines the default drive, and found it in the DWORD value HKEY_CURRENT_USER\Software\Cyberlink\PowerDVD11\UIFocusDCDrive.
  • Drive D:, Value = 3
  • Drive E:, Value = 4

So I made these two regfiles and placed them under C:\Users\<accountname>\AppData\Roaming\XBMC\userdata.

(Replace <accountname> with your own user name)

PDVD_UIFocusCDDrive_D.reg:
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Cyberlink\PowerDVD11]
"UIFocusCDDrive"=dword:00000003

PDVD_UIFocusCDDrive_E.reg:
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Cyberlink\PowerDVD11]
"UIFocusCDDrive"=dword:00000004

And added the import commands in PlayISO.bat and PlayDisc.bat, before PowerDVD starts:

PlayISO.bat:
Code:
@echo off
rem you can place your PlayISO file in \Roaming\XBMC\userdata\
rem you need to put the correct VCDMount drive letter in the command below

C:\Windows\regedit /s C:\Users\<accountname>\AppData\Roaming\XBMC\userdata\PDVD_UIFocusCDDrive_E.reg
"C:\Program Files\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files\CyberLink\PowerDVD11\PDVDLaunchPolicy.exe" E:

PlayDisc.bat:
Code:
@echo off
rem you can place your PlayDisc file anywhere

C:\Windows\regedit /s C:\Users\<accountname>\AppData\Roaming\XBMC\userdata\PDVD_UIFocusCDDrive_D.reg
"C:\Program Files\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
"C:\Program Files\CyberLink\PowerDVD11\PDVDLaunchPolicy.exe" D:

This way, I have always the right drive targeted as default drive.

I guess this method also works for PowerDVD 12, 10 and maybe older too, I can't test as I don't own those.

Important: Your drives most likely have different drive letters and therefore different values for UIFocusCDDrive, so check what your numbers are.

No rocket science, but maybe someone else can use this information too.

Cheers,
Tinu
Reply

Logout Mark Read Team Forum Stats Members Help
HOW-TO Dynamically set default drive in PowerDVD 11 in a multi-drive setup0