Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###############################################
- # Default File and Application Associations #
- ###############################################
- Start-Job -Name Job1 -ScriptBlock {
- ### Set Default App/File Associations ###
- $filepath ="$env:SystemDrive\Windows\System32"
- $filename = "\oemdefaultassociations.xml"
- $filefullpath = $filepath + $filename
- $findstring = '<Association Identifier=".pdf" ProgId="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXk660crfh0gw7gd9swc1nws708mn7qjr1" />'
- $replacestring = '<Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $filepath = "$env:SystemDrive\Windows\System32"
- $filename = "\oemdefaultassociations.xml"
- $filefullpath = $filepath + $filename
- ##################
- # Media Player #
- ##################
- $findstring = '<Association Identifier=".3g2" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.3G2" />'
- $replacestring = '<Association Identifier=".3g2" ProgId="VLC.3g2" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".3gp" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.3GP" />'
- $replacestring = '<Association Identifier=".3gp" ProgId="VLC.3gp" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".3gp2" ProgId="WMP11.AssocFile.3G2" ApplicationName="Windows Media Player" />'
- $replacestring = '<Association Identifier=".3gp2" ProgId="VLC.3gp2" ApplicationName="VLC" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".3gpp" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.3GP" />'
- $replacestring = '<Association Identifier=".3gpp" ProgId="VLC.3gpp" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".aac" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.ADTS" />'
- $replacestring = '<Association Identifier=".aac" ProgId="VLC.aac" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".adts" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.ADTS" />'
- $replacestring = '<Association Identifier=".adts" ProgId="VLC.adts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".ac3" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".ac3" ProgId="VLC.ac3" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".adt" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.ADTS" />'
- $replacestring = '<Association Identifier=".adt" ProgId="VLC.adt" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".amr" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".amr" ProgId="VLC.amr" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".avi" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.AVI" />'
- $replacestring = '<Association Identifier=".avi" ProgId="VLC.avi" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".flac" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".flac" ProgId="VLC.flac" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".m2t" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.M2TS" />'
- $replacestring = '<Association Identifier=".m2t" ProgId="VLC.m2t" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".m2ts" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.M2TS" />'
- $replacestring = '<Association Identifier=".m2ts" ProgId="VLC.m2ts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".m3u" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".m3u" ProgId="VLC.m3u" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".m4a" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.M4A" />'
- $replacestring = '<Association Identifier=".m4a" ProgId="VLC.m4a" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".m4r" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".m4r" ProgId="VLC.m4r" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".m4v" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MP4"/>'
- $replacestring = '<Association Identifier=".m4v" ProgId="VLC.m4v" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mka" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MKA"/>'
- $replacestring = '<Association Identifier=".mka" ProgId="VLC.mka" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mkv" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".mkv" ProgId="VLC.mkv" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mod" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
- $replacestring = '<Association Identifier=".mod" ProgId="VLC.mod" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mov" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MOV" />'
- $replacestring = '<Association Identifier=".mov" ProgId="VLC.mov" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".ec3" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".ec3" ProgId="VLC.ec3" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".MP2" ProgId="WMP11.AssocFile.MP3" ApplicationName="Windows Media Player" />'
- $replacestring = '<Association Identifier=".MP2" ProgId="VLC.mp2" ApplicationName="VLC" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mp3" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MP3" />'
- $replacestring = '<Association Identifier=".mp3" ProgId="VLC.mp3" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mp4" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MP4" />'
- $replacestring = '<Association Identifier=".mp4" ProgId="VLC.mp4" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mp4v" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.MP4" />'
- $replacestring = '<Association Identifier=".mp4v" ProgId="VLC.mp4v" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mpa" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
- $replacestring = '<Association Identifier=".mpa" ProgId="VLC.mpa" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".MPE" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
- $replacestring = '<Association Identifier=".MPE" ProgId="VLC.mpe" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mpeg" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
- $replacestring = '<Association Identifier=".mpeg" ProgId="VLC.mpeg" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mpg" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
- $replacestring = '<Association Identifier=".mpg" ProgId="VLC.mpg" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mpv2" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.MPEG" />'
- $replacestring = '<Association Identifier=".mpv2" ProgId="VLC.mpv2" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mts" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.M2TS" />'
- $replacestring = '<Association Identifier=".mts" ProgId="VLC.mts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".tod" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".tod" ProgId="VLC.tod" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".TS" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.TTS" />'
- $replacestring = '<Association Identifier=".TS" ProgId="VLC.ts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".TTS" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.TTS" />'
- $replacestring = '<Association Identifier=".TTS" ProgId="VLC.tts" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".wav" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WAV" />'
- $replacestring = '<Association Identifier=".wav" ProgId="VLC.wav" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".wm" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.ASF" />'
- $replacestring = '<Association Identifier=".wm" ProgId="VLC.wm" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".wma" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WMA" />'
- $replacestring = '<Association Identifier=".wma" ProgId="VLC.wma" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".wmv" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXhjhjmgrfm2d7rd026az898dy2p1pcsyt;WMP11.AssocFile.WMV" />'
- $replacestring = '<Association Identifier=".wmv" ProgId="VLC.wmv" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- <# Not supported by VLC
- $findstring = '<Association Identifier=".WPL" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WPL" />'
- $replacestring = '<Association Identifier=".WPL" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" OverwriteIfProgIdIs="WMP11.AssocFile.WPL" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- #>
- $findstring = '<Association Identifier="mswindowsmusic" ProgId="AppXtggqqtcfspt6ks3fjzyfppwc05yxwtwy" ApplicationName="Music" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier="mswindowsmusic" ProgId="VLC.mswindowsmusic" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier="mswindowsvideo" ProgId="AppX6w6n4f8xch1s3vzwf3af6bfe88qhxbza" ApplicationName="Movies & TV" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier="mswindowsvideo" ProgId="VLC.mswindowsvideo" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".zpl" ProgId="AppXqj98qxeaynz6dv4459ayz6bnqxbyaqcs" ApplicationName="Music" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".zpl" ProgId="VLC.zpl" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".xvid" ProgId="AppX6eg8h5sxqq90pv53845wmnbewywdqq5h" ApplicationName="Movies & TV" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".xvid" ProgId="VLC.xvid" ApplicationName="VLC" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- ##################
- # Browser #
- ##################
- $findstring = '<Association Identifier=".epub" ProgId="AppXvepbp3z66accmsd0x877zbbxjctkpr6t" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".epub" ProgId="AppXvepbp3z66accmsd0x877zbbxjctkpr6t" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".htm" ProgId="AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6k1pws1pa7jjhchyzw9jce3e6hg6vn8d" />'
- $replacestring = '<Association Identifier=".htm" ProgId="ChromeHTML" ApplicationName="Google Chrome" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".html" ProgId="AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX6k1pws1pa7jjhchyzw9jce3e6hg6vn8d" />'
- $replacestring = '<Association Identifier=".html" ProgId="ChromeHTML" ApplicationName="Google Chrome" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier="http" ProgId="AppXq0fevzme2pys62n3e0fbqa7peapykr8v" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXehk712w0hx4w5b8k25kg808a9h84jamg" />'
- $replacestring = '<Association Identifier="http" ProgId="ChromeHTML" ApplicationName="Google Chrome" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier="https" ProgId="AppX90nv6nhay5n6a98fnetv7tpk64pp35es" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXz8ws88f5y0y5nyrw1b3pj7xtm779tj2t" />'
- $replacestring = '<Association Identifier="https" ProgId="ChromeHTML" ApplicationName="Google Chrome" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Internet Explorer" />'
- $replacestring = '<Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Google Chrome" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".website" ProgId="IE.AssocFile.WEBSITE" ApplicationName="Internet Explorer" />'
- $replacestring = '<Association Identifier=".website" ProgId="IE.AssocFile.WEBSITE" ApplicationName="Google Chrome" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- ##################
- # Acrobat Reader #
- ##################
- $findstring = '<Association Identifier=".pdf" ProgId="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" ApplicationName="Microsoft Edge" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXk660crfh0gw7gd9swc1nws708mn7qjr1;AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
- $replacestring = '<Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- ##################
- # Photos #
- ##################
- <#
- $findstring = '<Association Identifier=".3mf" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg;AppXr0rz9yckydawgnrx5df1t9s57ne60yhn" />'
- $replacestring = '<Association Identifier=".3mf" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg;AppXr0rz9yckydawgnrx5df1t9s57ne60yhn" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".arw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".arw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".bmp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />'
- $replacestring = '<Association Identifier=".bmp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".cr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".cr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".crw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".crw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".dib" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />'
- $replacestring = '<Association Identifier=".dib" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;Paint.Picture" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".erf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".erf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".gif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;giffile" />'
- $replacestring = '<Association Identifier=".gif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;giffile" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".jfif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;pjpegfile" />'
- $replacestring = '<Association Identifier=".jfif" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;pjpegfile" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".jpe" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
- $replacestring = '<Association Identifier=".jpe" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".jpeg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
- $replacestring = '<Association Identifier=".jpeg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".jpg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
- $replacestring = '<Association Identifier=".jpg" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;jpegfile" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".jxr" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;wdpfile" />'
- $replacestring = '<Association Identifier=".jxr" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;wdpfile" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".kdc" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".kdc" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".mrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".mrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".nef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".nef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".nrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".nrw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".orf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".orf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".pef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".pef" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".png" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;pngfile" />'
- $replacestring = '<Association Identifier=".png" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype;pngfile" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".raf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".raf" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".raw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".raw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".rw2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".rw2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".rwl" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".rwl" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".tif" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />'
- $replacestring = '<Association Identifier=".tif" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".tiff" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />'
- $replacestring = '<Association Identifier=".tiff" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j;AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;TIFImage.Document" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".sr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".sr2" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".srw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".srw" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".wdp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- $replacestring = '<Association Identifier=".wdp" ProgId="AppX43hnxtbyyps62jhe9sqpdzxn1790zetc" ApplicationName="Photos" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX9vdwcvrwnbettpahnt26jswq0n8hgyah;Paint.Paint;Microsoft.PhotoManager.imagetype" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- #>
- ##################
- # 3D Photos #
- ##################
- <#
- $findstring = '<Association Identifier=".fbx" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".fbx" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".glb" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".glb" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".gltf" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".gltf" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".obj" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".obj" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".ply" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier=".ply" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".stl" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg;AppXr0rz9yckydawgnrx5df1t9s57ne60yhn" />'
- $replacestring = '<Association Identifier=".stl" ProgId="AppX4r6v2fg5b2qwg1jprp713smfp4wb02yp" ApplicationName="View 3D" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXvhc4p7vz4b485xfp46hhk3fq3grkdgjg;AppXr0rz9yckydawgnrx5df1t9s57ne60yhn" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- #>
- ##################
- # XPS Viewer #
- ##################
- <#
- $findstring = '<Association Identifier=".oxps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
- $replacestring = '<Association Identifier=".oxps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier=".xps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
- $replacestring = '<Association Identifier=".xps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppX86746z2101ayy2ygv3g96e4eqdf8r99j" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- #>
- ##################
- # Other #
- ##################
- <#
- $findstring = '<Association Identifier=".txt" ProgId="txtfile" ApplicationName="Notepad" />'
- $replacestring = '<Association Identifier=".txt" ProgId="txtfile" ApplicationName="Notepad" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier="bingmaps" ProgId="AppXp9gkwccvk6fa6yyfq3tmsk8ws2nprk1p" ApplicationName="Maps" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXde453qzh223ys1wt2jpyxz3z4cn10ngt;AppXsmrmb683pb8qxt0pktr3q27hkbyjm8sb" />'
- $replacestring = '<Association Identifier="bingmaps" ProgId="AppXp9gkwccvk6fa6yyfq3tmsk8ws2nprk1p" ApplicationName="Maps" ApplyOnUpgrade="true" OverwriteIfProgIdIs="AppXde453qzh223ys1wt2jpyxz3z4cn10ngt;AppXsmrmb683pb8qxt0pktr3q27hkbyjm8sb" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- $findstring = '<Association Identifier="mailto" ProgId="AppXydk58wgm44se4b399557yyyj1w7mbmvd" ApplicationName="Mail" ApplyOnUpgrade="true" />'
- $replacestring = '<Association Identifier="mailto" ProgId="AppXydk58wgm44se4b399557yyyj1w7mbmvd" ApplicationName="Mail" ApplyOnUpgrade="true" />'
- (get-content $filefullpath) | foreach-object {$_ -replace $findstring, $replacestring} | Set-Content $filefullpath
- $findstring = $null
- $replacestring = $null
- #>
- }
- Wait-Job -Name Job1
Advertisement
Add Comment
Please, Sign In to add comment