Guest User

Untitled

a guest
Mar 28th, 2018
765
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.04 KB | None | 0 0
  1. ###############################################
  2. # Default File and Application Associations #
  3. ###############################################
  4. Start-Job -Name Job1 -ScriptBlock {
  5. ### Set Default App/File Associations ###
  6. $filepath ="$env:SystemDrive\Windows\System32"
  7. $filename = "\oemdefaultassociations.xml"
  8. $filefullpath = $filepath + $filename
  9. $findstring = '<Association Identifier=".pdf" ProgId="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXk660crfh0gw7gd9swc1nws708mn7qjr1" />'
  10. $replacestring = '<Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" />'
  11.  
  12. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  13.  
  14. $filepath = "$env:SystemDrive\Windows\System32"
  15. $filename = "\oemdefaultassociations.xml"
  16. $filefullpath = $filepath + $filename
  17.  
  18. ##################
  19. # Media Player #
  20. ##################
  21. $findstring = '<Association Identifier=".3g2" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.3G2" />'
  22. $replacestring = '<Association Identifier=".3g2" ProgId="VLC.3g2" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  23. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  24. $findstring = $null
  25. $replacestring = $null
  26.  
  27. $findstring = '<Association Identifier=".3gp" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.3GP" />'
  28. $replacestring = '<Association Identifier=".3gp" ProgId="VLC.3gp" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  29. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  30. $findstring = $null
  31. $replacestring = $null
  32.  
  33. $findstring = '<Association Identifier=".3gp2" ProgId="WMP11.AssocFile.3G2" ApplicationName="Windows Media Player" />'
  34. $replacestring = '<Association Identifier=".3gp2" ProgId="VLC.3gp2" ApplicationName="VLC" />'
  35. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  36. $findstring = $null
  37. $replacestring = $null
  38.  
  39. $findstring = '<Association Identifier=".3gpp" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.3GP" />'
  40. $replacestring = '<Association Identifier=".3gpp" ProgId="VLC.3gpp" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  41. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  42. $findstring = $null
  43. $replacestring = $null
  44.  
  45. $findstring = '<Association Identifier=".aac" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.ADTS" />'
  46. $replacestring = '<Association Identifier=".aac" ProgId="VLC.aac" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  47. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  48. $findstring = $null
  49. $replacestring = $null
  50.  
  51. $findstring = '<Association Identifier=".adts" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.ADTS" />'
  52. $replacestring = '<Association Identifier=".adts" ProgId="VLC.adts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  53. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  54. $findstring = $null
  55. $replacestring = $null
  56.  
  57. $findstring = '<Association Identifier=".ac3" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
  58. $replacestring = '<Association Identifier=".ac3" ProgId="VLC.ac3" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  59. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  60. $findstring = $null
  61. $replacestring = $null
  62.  
  63. $findstring = '<Association Identifier=".adt" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.ADTS" />'
  64. $replacestring = '<Association Identifier=".adt" ProgId="VLC.adt" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  65. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  66. $findstring = $null
  67. $replacestring = $null
  68.  
  69. $findstring = '<Association Identifier=".amr" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
  70. $replacestring = '<Association Identifier=".amr" ProgId="VLC.amr" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  71. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  72. $findstring = $null
  73. $replacestring = $null
  74.  
  75. $findstring = '<Association Identifier=".avi" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.AVI" />'
  76. $replacestring = '<Association Identifier=".avi" ProgId="VLC.avi" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  77. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  78. $findstring = $null
  79. $replacestring = $null
  80.  
  81. $findstring = '<Association Identifier=".flac" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
  82. $replacestring = '<Association Identifier=".flac" ProgId="VLC.flac" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  83. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  84. $findstring = $null
  85. $replacestring = $null
  86.  
  87. $findstring = '<Association Identifier=".m2t" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.M2TS" />'
  88. $replacestring = '<Association Identifier=".m2t" ProgId="VLC.m2t" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  89. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  90. $findstring = $null
  91. $replacestring = $null
  92.  
  93. $findstring = '<Association Identifier=".m2ts" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.M2TS" />'
  94. $replacestring = '<Association Identifier=".m2ts" ProgId="VLC.m2ts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  95. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  96. $findstring = $null
  97. $replacestring = $null
  98.  
  99. $findstring = '<Association Identifier=".m3u" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
  100. $replacestring = '<Association Identifier=".m3u" ProgId="VLC.m3u" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  101. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  102. $findstring = $null
  103. $replacestring = $null
  104.  
  105. $findstring = '<Association Identifier=".m4a" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.M4A" />'
  106. $replacestring = '<Association Identifier=".m4a" ProgId="VLC.m4a" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  107. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  108. $findstring = $null
  109. $replacestring = $null
  110.  
  111. $findstring = '<Association Identifier=".m4r" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
  112. $replacestring = '<Association Identifier=".m4r" ProgId="VLC.m4r" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  113. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  114. $findstring = $null
  115. $replacestring = $null
  116.  
  117. $findstring = '<Association Identifier=".m4v" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MP4"/>'
  118. $replacestring = '<Association Identifier=".m4v" ProgId="VLC.m4v" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  119. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  120. $findstring = $null
  121. $replacestring = $null
  122.  
  123. $findstring = '<Association Identifier=".mka" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MKA"/>'
  124. $replacestring = '<Association Identifier=".mka" ProgId="VLC.mka" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  125. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  126. $findstring = $null
  127. $replacestring = $null
  128.  
  129. $findstring = '<Association Identifier=".mkv" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" />'
  130. $replacestring = '<Association Identifier=".mkv" ProgId="VLC.mkv" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  131. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  132. $findstring = $null
  133. $replacestring = $null
  134.  
  135. $findstring = '<Association Identifier=".mod" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
  136. $replacestring = '<Association Identifier=".mod" ProgId="VLC.mod" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  137. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  138. $findstring = $null
  139. $replacestring = $null
  140.  
  141. $findstring = '<Association Identifier=".mov" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MOV" />'
  142. $replacestring = '<Association Identifier=".mov" ProgId="VLC.mov" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  143. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  144. $findstring = $null
  145. $replacestring = $null
  146.  
  147. $findstring = '<Association Identifier=".ec3" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
  148. $replacestring = '<Association Identifier=".ec3" ProgId="VLC.ec3" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  149. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  150. $findstring = $null
  151. $replacestring = $null
  152.  
  153. $findstring = '<Association Identifier=".MP2" ProgId="WMP11.AssocFile.MP3" ApplicationName="Windows Media Player" />'
  154. $replacestring = '<Association Identifier=".MP2" ProgId="VLC.mp2" ApplicationName="VLC" />'
  155. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  156. $findstring = $null
  157. $replacestring = $null
  158.  
  159. $findstring = '<Association Identifier=".mp3" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MP3" />'
  160. $replacestring = '<Association Identifier=".mp3" ProgId="VLC.mp3" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  161. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  162. $findstring = $null
  163. $replacestring = $null
  164.  
  165. $findstring = '<Association Identifier=".mp4" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MP4" />'
  166. $replacestring = '<Association Identifier=".mp4" ProgId="VLC.mp4" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  167. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  168. $findstring = $null
  169. $replacestring = $null
  170.  
  171. $findstring = '<Association Identifier=".mp4v" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MP4" />'
  172. $replacestring = '<Association Identifier=".mp4v" ProgId="VLC.mp4v" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  173. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  174. $findstring = $null
  175. $replacestring = $null
  176.  
  177. $findstring = '<Association Identifier=".mpa" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
  178. $replacestring = '<Association Identifier=".mpa" ProgId="VLC.mpa" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  179. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  180. $findstring = $null
  181. $replacestring = $null
  182.  
  183. $findstring = '<Association Identifier=".MPE" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
  184. $replacestring = '<Association Identifier=".MPE" ProgId="VLC.mpe" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  185. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  186. $findstring = $null
  187. $replacestring = $null
  188.  
  189. $findstring = '<Association Identifier=".mpeg" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
  190. $replacestring = '<Association Identifier=".mpeg" ProgId="VLC.mpeg" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  191. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  192. $findstring = $null
  193. $replacestring = $null
  194.  
  195. $findstring = '<Association Identifier=".mpg" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
  196. $replacestring = '<Association Identifier=".mpg" ProgId="VLC.mpg" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  197. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  198. $findstring = $null
  199. $replacestring = $null
  200.  
  201. $findstring = '<Association Identifier=".mpv2" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
  202. $replacestring = '<Association Identifier=".mpv2" ProgId="VLC.mpv2" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  203. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  204. $findstring = $null
  205. $replacestring = $null
  206.  
  207. $findstring = '<Association Identifier=".mts" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.M2TS" />'
  208. $replacestring = '<Association Identifier=".mts" ProgId="VLC.mts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  209. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  210. $findstring = $null
  211. $replacestring = $null
  212.  
  213. $findstring = '<Association Identifier=".tod" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" />'
  214. $replacestring = '<Association Identifier=".tod" ProgId="VLC.tod" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  215. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  216. $findstring = $null
  217. $replacestring = $null
  218.  
  219. $findstring = '<Association Identifier=".TS" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.TTS" />'
  220. $replacestring = '<Association Identifier=".TS" ProgId="VLC.ts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  221. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  222. $findstring = $null
  223. $replacestring = $null
  224.  
  225. $findstring = '<Association Identifier=".TTS" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.TTS" />'
  226. $replacestring = '<Association Identifier=".TTS" ProgId="VLC.tts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  227. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  228. $findstring = $null
  229. $replacestring = $null
  230.  
  231. $findstring = '<Association Identifier=".wav" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WAV" />'
  232. $replacestring = '<Association Identifier=".wav" ProgId="VLC.wav" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  233. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  234. $findstring = $null
  235. $replacestring = $null
  236.  
  237. $findstring = '<Association Identifier=".wm" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.ASF" />'
  238. $replacestring = '<Association Identifier=".wm" ProgId="VLC.wm" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  239. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  240. $findstring = $null
  241. $replacestring = $null
  242.  
  243. $findstring = '<Association Identifier=".wma" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WMA" />'
  244. $replacestring = '<Association Identifier=".wma" ProgId="VLC.wma" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  245. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  246. $findstring = $null
  247. $replacestring = $null
  248.  
  249. $findstring = '<Association Identifier=".wmv" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.WMV" />'
  250. $replacestring = '<Association Identifier=".wmv" ProgId="VLC.wmv" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  251. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  252. $findstring = $null
  253. $replacestring = $null
  254.  
  255. <# Not supported by VLC
  256. $findstring = '<Association Identifier=".WPL" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WPL" />'
  257. $replacestring = '<Association Identifier=".WPL" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WPL" />'
  258. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  259. $findstring = $null
  260. $replacestring = $null
  261. #>
  262.  
  263. $findstring = '<Association Identifier="mswindowsmusic" ProgId="AppXtggqqtcfspt6ks3fjzyfppwc05yxwtwy" ApplicationName="Music" ApplyOnUpgrade="true" />'
  264. $replacestring = '<Association Identifier="mswindowsmusic" ProgId="VLC.mswindowsmusic" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  265. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  266. $findstring = $null
  267. $replacestring = $null
  268.  
  269. $findstring = '<Association Identifier="mswindowsvideo" ProgId="AppX6w6n4f8xch1s3vzwf3af6bfe88qhxbza" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" />'
  270. $replacestring = '<Association Identifier="mswindowsvideo" ProgId="VLC.mswindowsvideo" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  271. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  272. $findstring = $null
  273. $replacestring = $null
  274.  
  275. $findstring = '<Association Identifier=".zpl" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
  276. $replacestring = '<Association Identifier=".zpl" ProgId="VLC.zpl" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  277. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  278. $findstring = $null
  279. $replacestring = $null
  280.  
  281. $findstring = '<Association Identifier=".xvid" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies &amp; TV" ApplyOnUpgrade="true" />'
  282. $replacestring = '<Association Identifier=".xvid" ProgId="VLC.xvid" ApplicationName="VLC" ApplyOnUpgrade="true" />'
  283. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  284. $findstring = $null
  285. $replacestring = $null
  286.  
  287.  
  288. ##################
  289. # Browser #
  290. ##################
  291. $findstring = '<Association Identifier=".epub" ProgId="AppXvepbp3z66accmsd0x877zbbxjctkpr6t" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" />'
  292. $replacestring = '<Association Identifier=".epub" ProgId="AppXvepbp3z66accmsd0x877zbbxjctkpr6t" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" />'
  293. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  294. $findstring = $null
  295. $replacestring = $null
  296.  
  297. $findstring = '<Association Identifier=".htm" ProgId="AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6k1pws1pa7jjhchyzw9jce3e6hg6vn8d" />'
  298. $replacestring = '<Association Identifier=".htm" ProgId="ChromeHTML" ApplicationName="Google Chrome" />'
  299. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  300. $findstring = $null
  301. $replacestring = $null
  302.  
  303. $findstring = '<Association Identifier=".html" ProgId="AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6k1pws1pa7jjhchyzw9jce3e6hg6vn8d" />'
  304. $replacestring = '<Association Identifier=".html" ProgId="ChromeHTML" ApplicationName="Google Chrome" />'
  305. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  306. $findstring = $null
  307. $replacestring = $null
  308.  
  309. $findstring = '<Association Identifier="http" ProgId="AppXq0fevzme2pys62n3e0fbqa7peapykr8v" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXehk712w0hx4w5b8k25kg808a9h84jamg" />'
  310. $replacestring = '<Association Identifier="http" ProgId="ChromeHTML" ApplicationName="Google Chrome" />'
  311. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  312. $findstring = $null
  313. $replacestring = $null
  314.  
  315. $findstring = '<Association Identifier="https" ProgId="AppX90nv6nhay5n6a98fnetv7tpk64pp35es" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXz8ws88f5y0y5nyrw1b3pj7xtm779tj2t" />'
  316. $replacestring = '<Association Identifier="https" ProgId="ChromeHTML" ApplicationName="Google Chrome" />'
  317. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  318. $findstring = $null
  319. $replacestring = $null
  320.  
  321. $findstring = '<Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Internet Explorer" />'
  322. $replacestring = '<Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Google Chrome" />'
  323. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  324. $findstring = $null
  325. $replacestring = $null
  326.  
  327. $findstring = '<Association Identifier=".website" ProgId="IE.AssocFile.WEBSITE" ApplicationName="Internet Explorer" />'
  328. $replacestring = '<Association Identifier=".website" ProgId="IE.AssocFile.WEBSITE" ApplicationName="Google Chrome" />'
  329. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  330. $findstring = $null
  331. $replacestring = $null
  332.  
  333.  
  334. ##################
  335. # Acrobat Reader #
  336. ##################
  337. $findstring = '<Association Identifier=".pdf" ProgId="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXk660crfh0gw7gd9swc1nws708mn7qjr1;AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
  338. $replacestring = '<Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" />'
  339. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  340. $findstring = $null
  341. $replacestring = $null
  342.  
  343.  
  344. ##################
  345. # Photos #
  346. ##################
  347. <#
  348. $findstring = '<Association Identifier=".3mf" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg;AppXr0rz9yckydawgnrx5df1t9s57ne60yhn" />'
  349. $replacestring = '<Association Identifier=".3mf" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg;AppXr0rz9yckydawgnrx5df1t9s57ne60yhn" />'
  350. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  351. $findstring = $null
  352. $replacestring = $null
  353.  
  354. $findstring = '<Association Identifier=".arw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  355. $replacestring = '<Association Identifier=".arw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  356. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  357. $findstring = $null
  358. $replacestring = $null
  359.  
  360. $findstring = '<Association Identifier=".bmp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />'
  361. $replacestring = '<Association Identifier=".bmp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />'
  362. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  363. $findstring = $null
  364. $replacestring = $null
  365.  
  366. $findstring = '<Association Identifier=".cr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  367. $replacestring = '<Association Identifier=".cr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  368. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  369. $findstring = $null
  370. $replacestring = $null
  371.  
  372. $findstring = '<Association Identifier=".crw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  373. $replacestring = '<Association Identifier=".crw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  374. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  375. $findstring = $null
  376. $replacestring = $null
  377.  
  378. $findstring = '<Association Identifier=".dib" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />'
  379. $replacestring = '<Association Identifier=".dib" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />'
  380. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  381. $findstring = $null
  382. $replacestring = $null
  383.  
  384. $findstring = '<Association Identifier=".erf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  385. $replacestring = '<Association Identifier=".erf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  386. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  387. $findstring = $null
  388. $replacestring = $null
  389.  
  390. $findstring = '<Association Identifier=".gif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;giffile" />'
  391. $replacestring = '<Association Identifier=".gif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;giffile" />'
  392. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  393. $findstring = $null
  394. $replacestring = $null
  395.  
  396. $findstring = '<Association Identifier=".jfif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;pjpegfile" />'
  397. $replacestring = '<Association Identifier=".jfif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;pjpegfile" />'
  398. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  399. $findstring = $null
  400. $replacestring = $null
  401.  
  402. $findstring = '<Association Identifier=".jpe" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
  403. $replacestring = '<Association Identifier=".jpe" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
  404. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  405. $findstring = $null
  406. $replacestring = $null
  407.  
  408. $findstring = '<Association Identifier=".jpeg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
  409. $replacestring = '<Association Identifier=".jpeg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
  410. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  411. $findstring = $null
  412. $replacestring = $null
  413.  
  414. $findstring = '<Association Identifier=".jpg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
  415. $replacestring = '<Association Identifier=".jpg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
  416. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  417. $findstring = $null
  418. $replacestring = $null
  419.  
  420. $findstring = '<Association Identifier=".jxr" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;wdpfile" />'
  421. $replacestring = '<Association Identifier=".jxr" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;wdpfile" />'
  422. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  423. $findstring = $null
  424. $replacestring = $null
  425.  
  426. $findstring = '<Association Identifier=".kdc" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  427. $replacestring = '<Association Identifier=".kdc" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  428. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  429. $findstring = $null
  430. $replacestring = $null
  431.  
  432. $findstring = '<Association Identifier=".mrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  433. $replacestring = '<Association Identifier=".mrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  434. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  435. $findstring = $null
  436. $replacestring = $null
  437.  
  438. $findstring = '<Association Identifier=".nef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  439. $replacestring = '<Association Identifier=".nef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  440. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  441. $findstring = $null
  442. $replacestring = $null
  443.  
  444. $findstring = '<Association Identifier=".nrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  445. $replacestring = '<Association Identifier=".nrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  446. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  447. $findstring = $null
  448. $replacestring = $null
  449.  
  450. $findstring = '<Association Identifier=".orf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  451. $replacestring = '<Association Identifier=".orf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  452. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  453. $findstring = $null
  454. $replacestring = $null
  455.  
  456. $findstring = '<Association Identifier=".pef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  457. $replacestring = '<Association Identifier=".pef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  458. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  459. $findstring = $null
  460. $replacestring = $null
  461.  
  462. $findstring = '<Association Identifier=".png" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;pngfile" />'
  463. $replacestring = '<Association Identifier=".png" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;pngfile" />'
  464. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  465. $findstring = $null
  466. $replacestring = $null
  467.  
  468. $findstring = '<Association Identifier=".raf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  469. $replacestring = '<Association Identifier=".raf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  470. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  471. $findstring = $null
  472. $replacestring = $null
  473.  
  474. $findstring = '<Association Identifier=".raw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  475. $replacestring = '<Association Identifier=".raw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  476. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  477. $findstring = $null
  478. $replacestring = $null
  479.  
  480. $findstring = '<Association Identifier=".rw2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  481. $replacestring = '<Association Identifier=".rw2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  482. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  483. $findstring = $null
  484. $replacestring = $null
  485.  
  486. $findstring = '<Association Identifier=".rwl" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  487. $replacestring = '<Association Identifier=".rwl" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  488. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  489. $findstring = $null
  490. $replacestring = $null
  491.  
  492. $findstring = '<Association Identifier=".tif" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />'
  493. $replacestring = '<Association Identifier=".tif" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />'
  494. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  495. $findstring = $null
  496. $replacestring = $null
  497.  
  498. $findstring = '<Association Identifier=".tiff" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />'
  499. $replacestring = '<Association Identifier=".tiff" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />'
  500. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  501. $findstring = $null
  502. $replacestring = $null
  503.  
  504. $findstring = '<Association Identifier=".sr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  505. $replacestring = '<Association Identifier=".sr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  506. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  507. $findstring = $null
  508. $replacestring = $null
  509.  
  510. $findstring = '<Association Identifier=".srw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  511. $replacestring = '<Association Identifier=".srw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  512. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  513. $findstring = $null
  514. $replacestring = $null
  515.  
  516. $findstring = '<Association Identifier=".wdp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  517. $replacestring = '<Association Identifier=".wdp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
  518. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  519. $findstring = $null
  520. $replacestring = $null
  521. #>
  522.  
  523. ##################
  524. # 3D Photos #
  525. ##################
  526. <#
  527. $findstring = '<Association Identifier=".fbx" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  528. $replacestring = '<Association Identifier=".fbx" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  529. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  530. $findstring = $null
  531. $replacestring = $null
  532.  
  533. $findstring = '<Association Identifier=".glb" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  534. $replacestring = '<Association Identifier=".glb" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  535. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  536. $findstring = $null
  537. $replacestring = $null
  538.  
  539. $findstring = '<Association Identifier=".gltf" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  540. $replacestring = '<Association Identifier=".gltf" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  541. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  542. $findstring = $null
  543. $replacestring = $null
  544.  
  545. $findstring = '<Association Identifier=".obj" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  546. $replacestring = '<Association Identifier=".obj" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  547. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  548. $findstring = $null
  549. $replacestring = $null
  550.  
  551. $findstring = '<Association Identifier=".ply" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  552. $replacestring = '<Association Identifier=".ply" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
  553. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  554. $findstring = $null
  555. $replacestring = $null
  556.  
  557. $findstring = '<Association Identifier=".stl" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg;AppXr0rz9yckydawgnrx5df1t9s57ne60yhn" />'
  558. $replacestring = '<Association Identifier=".stl" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg;AppXr0rz9yckydawgnrx5df1t9s57ne60yhn" />'
  559. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  560. $findstring = $null
  561. $replacestring = $null
  562. #>
  563.  
  564.  
  565. ##################
  566. # XPS Viewer #
  567. ##################
  568. <#
  569. $findstring = '<Association Identifier=".oxps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
  570. $replacestring = '<Association Identifier=".oxps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
  571. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  572. $findstring = $null
  573. $replacestring = $null
  574.  
  575. $findstring = '<Association Identifier=".xps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
  576. $replacestring = '<Association Identifier=".xps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
  577. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  578. $findstring = $null
  579. $replacestring = $null
  580. #>
  581.  
  582. ##################
  583. # Other #
  584. ##################
  585. <#
  586. $findstring = '<Association Identifier=".txt" ProgId="txtfile" ApplicationName="Notepad" />'
  587. $replacestring = '<Association Identifier=".txt" ProgId="txtfile" ApplicationName="Notepad" />'
  588. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  589. $findstring = $null
  590. $replacestring = $null
  591.  
  592. $findstring = '<Association Identifier="bingmaps" ProgId="AppXp9gkwccvk6fa6yyfq3tmsk8ws2nprk1p" ApplicationName="Maps" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXde453qzh223ys1wt2jpyxz3z4cn10ngt;AppXsmrmb683pb8qxt0pktr3q27hkbyjm8sb" />'
  593. $replacestring = '<Association Identifier="bingmaps" ProgId="AppXp9gkwccvk6fa6yyfq3tmsk8ws2nprk1p" ApplicationName="Maps" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXde453qzh223ys1wt2jpyxz3z4cn10ngt;AppXsmrmb683pb8qxt0pktr3q27hkbyjm8sb" />'
  594. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  595. $findstring = $null
  596. $replacestring = $null
  597.  
  598. $findstring = '<Association Identifier="mailto" ProgId="AppXydk58wgm44se4b399557yyyj1w7mbmvd" ApplicationName="Mail" ApplyOnUpgrade="true" />'
  599. $replacestring = '<Association Identifier="mailto" ProgId="AppXydk58wgm44se4b399557yyyj1w7mbmvd" ApplicationName="Mail" ApplyOnUpgrade="true" />'
  600. (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
  601. $findstring = $null
  602. $replacestring = $null
  603. #>
  604. }
  605. Wait-Job -Name Job1
Advertisement
Add Comment
Please, Sign In to add comment