|
1 |
| -#DVDFab AutoCloning Script |
2 |
| -#Installer, must be running as administrator to Install |
| 1 | +### DVDFab AutoCloning Script ### |
| 2 | +### Update 7/14/2021 ### |
| 3 | +### Requires DVDFab and a UHD Friendly Drive to Clone Blu ray Discs ### |
| 4 | +### ".\DVDFab.ps1 - Install" must be running as administrator to Install ### |
| 5 | +### Be Sure to Set the DVDFab Variables for your enviroment ### |
| 6 | +### $DVDFab is the location of your DVDFab executable ### |
| 7 | +### $Mode is the mode to run DVDFab in see https://www.dvdfab.cn/manual/introduction/command-line ### |
| 8 | +### $Dest is the Destination path for your copy/clone $DVD is your optical drive ### |
| 9 | +### |
| 10 | +### |
3 | 11 | Param(
|
4 | 12 | #[Parameter(Mandatory=$false)]
|
5 | 13 | [Switch]$Install
|
@@ -39,21 +47,26 @@ Return}
|
39 | 47 | While($true)
|
40 | 48 | {
|
41 | 49 | #Check CDDrive for Optical Disc
|
| 50 | +### VARIABLES ### |
| 51 | +### BE Sure to Check these for your enviroment ### |
| 52 | +### These are required to work properly ### |
42 | 53 | $Media= (Get-WMIObject -Class Win32_CDROMDrive -Property *).MediaLoaded
|
43 | 54 | #Set DVDFab Location
|
44 | 55 | $DVDFab= "C:\Program Files\DVDFab\DVDFab 12\DVDFab64.exe"
|
45 | 56 | #Set DVDFab Mode
|
46 | 57 | #Double Quotes required, DVDFab Commandline needs quotes https://www.dvdfab.cn/manual/introduction/command-line
|
47 |
| -$Mode="`"BDCLONE`"" |
| 58 | +$Mode="`"BDFULLDISC`"" |
48 | 59 | #Set Destination Folder
|
49 |
| -$Dest="`"E:\Videos\Movies`"" |
| 60 | +$Dest="`"E:\Videos\Movies\volume.iso`"" |
50 | 61 | #Set DVD Drive Letter
|
51 | 62 | $DVD= "`"D:\`""
|
52 | 63 | #Check If DVD is in Drive and start DVDFab Cloning, waiting for process to end
|
53 | 64 |
|
54 | 65 | If ($Media -eq $true) {
|
55 | 66 | #Print That Drive is Ripping, Lauch DVDFab and Wait for DVDFab to close
|
56 | 67 | Write-Host 'Media is in Drive, Starting DVDFab Rip';
|
| 68 | +## Close Staticly set, not a Variable as the process will not work automacitly if DVDFab is not ending it's process |
| 69 | +### It's also required to be able to run as a service, as we can no longer interact with applications running as a service |
57 | 70 | Start-Process $DVDFab -Wait -ArgumentList ('/Mode',$Mode,'/SRC',$DVD,'/DEST',$Dest,'/CLOSE')
|
58 | 71 | Write-Host "Done Copying, Ejecting CD Tray if not already Ejected"
|
59 | 72 | #Ejecting requires administrative rights
|
|
0 commit comments