从命令行打开带有VLC的DVD菜单


0

对于某些DVD,当我打开DVD时,VLC会打开第1轨道。我更喜欢打开菜单。有没有办法从命令行我可以让VLC打开DVD菜单?目前我必须打开它,然后右键单击并转到播放>标题> DVD菜单。

Answers:



0

我需要创建一个脚本来确定DVD所在的驱动器,是否有驱动器,以及是否有多个驱动器告诉用户它无法确定要执行的驱动器。这就是我想出的:

#Begin Script

Add-Type -AssemblyName System.Windows.Forms


function Get-CDDrives {
@(Get-WmiObject win32_logicaldisk -filter 'DriveType=5' |
ForEach-Object { $_.DeviceID })
}


$Drive = Get-CDDrives
if ($Drive.count -gt 1) {[System.Windows.Forms.MessageBox]::Show("Unfortunately, you have more than one DVD drive, and I'm not smart enough to know which one to use for you video." , "Error" , 0)}
if ($Drive.count -eq 1) {& "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" dvd:///"$Drive"\}
if ($Drive.count -lt 1) {[System.Windows.Forms.MessageBox]::Show("Hmmm... I can't seem to find a DVD drive on your computer." , "Error" , 0)}
#End Script

显然,如果需要,请更改VLC EXE的路径。以下是一些错误的图片: 不止一个驱动器。

如果未检测到驱动器。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.