@@ -15,7 +15,7 @@ public static class RegistryUtilities
1515{
1616 private static readonly bool IsBeta = CommonUtilities . Beta ;
1717 private static readonly string LocalAppFolder = CommonUtilities . LocalAppFolder ;
18- private static readonly string WindowlessCliExePath = Path . Combine ( LocalAppFolder , "VidCoderWindowlessCLI.exe" ) ;
18+ private static readonly string WindowlessCliExePath = Path . Combine ( LocalAppFolder , "current" , " VidCoderWindowlessCLI.exe") ;
1919
2020 private const string EventHandlersKeyPath = @"Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers" ;
2121
@@ -63,6 +63,15 @@ public static void Uninstall(IBasicLogger logger)
6363 logger . Log ( "Finished uninstalling registry keys." ) ;
6464 }
6565
66+ // Only needed to fix file associations when upgrading to v49
67+ public static void RefreshFileAssociations ( IBasicLogger logger )
68+ {
69+ logger . Log ( "Refreshing file associations..." ) ;
70+ RemoveFileAssociations ( logger ) ;
71+ AddFileAssociations ( logger ) ;
72+ logger . Log ( "Finished refreshing file associations." ) ;
73+ }
74+
6675 public static bool AreRegKeysInstalled ( )
6776 {
6877 RegistryKey presetKey = Registry . CurrentUser . OpenSubKey ( VJPresetExtensionKeyPath ) ;
@@ -162,7 +171,7 @@ private static void AddFileAssociations(IBasicLogger logger)
162171 presetKey . SetValue ( null , PresetProgId ) ;
163172 presetKey . Close ( ) ;
164173
165- string presetIconPath = Path . Combine ( CommonUtilities . LocalAppFolder , "VidCoderPreset.ico" ) ;
174+ string presetIconPath = Path . Combine ( CommonUtilities . LocalAppFolder , "current" , " VidCoderPreset.ico") ;
166175
167176 RegistryKey presetIconKey = Registry . CurrentUser . CreateSubKey ( $@ "{ PresetClassesKeyPath } \DefaultIcon") ;
168177 presetIconKey . SetValue ( null , $ "\" { presetIconPath } \" ") ;
@@ -177,7 +186,7 @@ private static void AddFileAssociations(IBasicLogger logger)
177186 queueKey . SetValue ( null , QueueProgId ) ;
178187 queueKey . Close ( ) ;
179188
180- string queueIconPath = Path . Combine ( CommonUtilities . LocalAppFolder , "VidCoderQueue.ico" ) ;
189+ string queueIconPath = Path . Combine ( CommonUtilities . LocalAppFolder , "current" , " VidCoderQueue.ico") ;
181190
182191 RegistryKey queueIconKey = Registry . CurrentUser . CreateSubKey ( $@ "{ QueueClassesKeyPath } \DefaultIcon") ;
183192 queueIconKey . SetValue ( null , $ "\" { queueIconPath } \" ") ;
0 commit comments