1
- # ## DVDFab AutoCloning Script ###
2
- # ## Update 7/14 /2021 ###
1
+ # ## DVDFab AutoCloning Script v2.2 Final ###
2
+ # ## Updated 8/15 /2021 ###
3
3
# ## Requires DVDFab and a UHD Friendly Drive to Clone Blu ray Discs ###
4
4
# ## ".\DVDFab.ps1 - Install" must be running as administrator to Install ###
5
5
# ## Be Sure to Set the DVDFab Variables for your enviroment ###
10
10
# ##
11
11
Param (
12
12
# [Parameter(Mandatory=$false)]
13
- [Switch ]$Install
13
+ [Switch ]$Install ,
14
+ [Switch ]$LiveUpdate
14
15
)
15
16
if ($Install ){
16
17
Write-Host ' Please Wait.. Installing DVDFabAutoRip Service'
@@ -42,6 +43,16 @@ Start-Sleep -Seconds .5
42
43
& $nssm status $ServiceName
43
44
Write-Host ' Service is now installed'
44
45
Return }
46
+ if ($LiveUpdate ){
47
+ # kill LiveUpdate.exe which will prevent process from looping if an update is found
48
+ Start-Sleep - Seconds 45
49
+ Write-Host " Ending Liveupdate.exe"
50
+ Stop-Process - Name LiveUpdate
51
+ # Delay incase we missed LiveUpdate the first try
52
+ Start-Sleep - Seconds 60
53
+ Write-Host " Ending Liveupdate.exe"
54
+ Stop-Process - Name LiveUpdate
55
+ Return }
45
56
# Normal Script
46
57
# loop
47
58
While ($true )
@@ -63,10 +74,11 @@ $DVDLabel= Get-Volume -DriveLetter D| % FileSystemLabel
63
74
# Set Destination Folder
64
75
$Dest = " `" E:\Videos\Movies\$DVDLabel .iso`" "
65
76
# Check If DVD is in Drive and start DVDFab Cloning, waiting for process to end
66
-
67
77
If ($Media -eq $true ) {
68
78
# Print That Drive is Ripping, Lauch DVDFab and Wait for DVDFab to close
69
79
Write-Host ' Media is in Drive, Starting DVDFab Rip' ;
80
+ # # Launch Script with switch to end LiveUpdate, in it's own session
81
+ Start-Process Powershell.exe - Argumentlist " -file $PSScriptRoot \DVDFab.ps1 -LiveUpdate"
70
82
# # Close Staticly set, not a Variable as the process will not work automacitly if DVDFab is not ending it's process
71
83
# ## It's also required to be able to run as a service, as we can no longer interact with applications running as a service
72
84
Start-Process $DVDFab - Wait - ArgumentList (' /Mode' , $Mode , ' /SRC' , $DVD , ' /DEST' , $Dest , ' /CLOSE' )
0 commit comments