Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit c6c1440

Browse files
Merge pull request #7 from thecreativeone91/DVDFabAutoRip2.3Final
Fix DVDFab Service issues
2 parents 3487467 + f825665 commit c6c1440

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

DVDFab.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
### DVDFab AutoCloning Script v2.2 Final ###
2-
### Updated 8/15/2021 ###
1+
### DVDFab AutoCloning Script v2.3 Final ###
2+
### Updated 2/27/2022 ###
33
### Requires DVDFab and a UHD Friendly Drive to Clone Blu ray Discs ###
44
### ".\DVDFab.ps1 - Install" must be running as administrator to Install ###
55
### Be Sure to Set the DVDFab Variables for your enviroment ###
@@ -52,7 +52,7 @@ Stop-Process -Name LiveUpdate
5252
Start-Sleep -Seconds 60
5353
Write-Host "Ending Liveupdate.exe"
5454
Stop-Process -Name LiveUpdate
55-
Return}
55+
Exit}
5656
#Normal Script
5757
#loop
5858
While($true)
@@ -84,7 +84,10 @@ Start-Process Powershell.exe -Argumentlist "-file $PSScriptRoot\DVDFab.ps1 -Live
8484
Start-Process $DVDFab -Wait -ArgumentList ('/Mode',$Mode,'/SRC',$DVD,'/DEST',$Dest,'/CLOSE')
8585
Write-Host "Done Copying, Ejecting CD Tray if not already Ejected"
8686
#Ejecting requires administrative rights
87-
(New-Object -com "WMPlayer.OCX.7").cdromcollection.item(0).eject()
87+
$sh = New-Object -ComObject "Shell.Application"
88+
$sh.Namespace(17).Items() |
89+
Where-Object { $_.Type -eq "CD Drive" } |
90+
foreach { $_.InvokeVerb("Eject") }
8891

8992
} Else {
9093
#Print that Drive has no media and wait 30 seconds before looping

0 commit comments

Comments
 (0)