@@ -64,6 +64,7 @@ function Unregister-Dll {
6464 }
6565}
6666
67+ # full list of Calibre-supported extensions from the registry
6768function GetCalibreExtensions {
6869 $calibreAssocKey = " HKCU:\SOFTWARE\calibre\calibre64bit\Capabilities\FileAssociations"
6970 if (Test-Path $calibreAssocKey ) {
@@ -75,6 +76,8 @@ function GetCalibreExtensions {
7576 }
7677}
7778
79+ <# adding registry entries for all Calibre-supported extensions
80+ this is redundant, since the C# code already takes care of this upon registration #>
7881function Add-RegistryEntries {
7982 $extensions = GetCalibreExtensions
8083 $guid = " 8E5CD5CA-64E0-479A-B62F-B1FC00FF0227"
@@ -89,6 +92,8 @@ function Add-RegistryEntries {
8992 }
9093}
9194
95+ <# removing registry entries for all Calibre-supported extensions
96+ this is redundant, since the C# code already takes care of this upon unregistration #>
9297function Remove-RegistryEntries {
9398 $extensions = GetCalibreExtensions
9499
@@ -101,12 +106,14 @@ function Remove-RegistryEntries {
101106 }
102107}
103108
109+ # optional
104110function Restart-Explorer {
105111 Stop-Process - Name explorer - Force
106112 Start-Process explorer
107113 Log " Explorer restarted"
108114}
109115
116+ # verify whether the dll registration went through successfully
110117function Check-DllRegistration {
111118 param (
112119 [string ]$dllPath
@@ -134,6 +141,7 @@ if (-not $dllFiles) {
134141 throw " No DLLs found in the script directory."
135142}
136143
144+ # main script logic
137145if ($i -or (-not $u -and -not $re )) {
138146 foreach ($dllFile in $dllFiles ) {
139147 $dllPath = $dllFile.FullName
0 commit comments