
copy /y "Associations.dll" "%WINDIR%\System32\OEMDefaultAssociations.dll"
del /q /f "%WINDIR%\System32\OEMDefaultAssociations.xml"

@echo OFF
for /f "usebackq tokens=2 delims=\" %%A in (`reg query "HKEY_USERS" ^| findstr /r /x /c:"HKEY_USERS\\S-.*" /c:"HKEY_USERS\\AME_UserHive_[^_]*"`) do (
	REM If the "Volatile Environment" key exists, that means it is a proper user. Built in accounts/SIDs don't have this key.
	reg query "HKU\%%A" | findstr /c:"Volatile Environment" /c:"AME_UserHive_" > NUL 2>&1
		if not errorlevel 1 (
			PowerShell -NoP -ExecutionPolicy Bypass -File assoc.ps1 "Placeholder" "%%A" ".html:FirefoxHTML-308046B0AF4A39CB" ".htm:FirefoxHTML-308046B0AF4A39CB" ".url:FirefoxURL-308046B0AF4A39CB" "Proto:https:FirefoxURL-308046B0AF4A39CB" "Proto:http:FirefoxURL-308046B0AF4A39CB" "Proto:mailto:Thunderbird.Url.mailto" ".3fr:nomacs.3fr.3" ".3g2:VLC.3g2" ".3gp:VLC.3gp" ".3gp2:VLC.3gp2" ".3gpp:VLC.3gpp" ".aac:VLC.aac" ".adts:VLC.adts" ".aif:VLC.aif" ".aifc:VLC.aifc" ".aiff:VLC.aiff" ".amr:VLC.amr" ".asf:VLC.asf" ".asx:VLC.asx" ".au:VLC.au" ".avi:VLC.avi" ".avifs:nomacs.avifs.3" ".bmp:nomacs.bmp.3" ".cda:VLC.cda" ".cur:nomacs.cur.3" ".dcx:nomacs.dcx.3" ".drif:nomacs.drif.3" ".exif:nomacs.exif.3" ".flac:VLC.flac" ".heif:nomacs.heif.3" ".heifs:nomacs.heifs.3" ".icns:nomacs.icns.3" ".iiq:nomacs.iiq.3" ".jp2:nomacs.jp2.3" ".jpf:nomacs.jp2.3" ".jpg:nomacs.jpg.3" ".jpeg:nomacs.jpg.3" ".jps:nomacs.jps.3" ".m1v:VLC.m1v" ".m2t:VLC.m2t" ".m2ts:VLC.m2ts" ".m3u:VLC.m3u" ".m4a:VLC.m4a" ".m4p:VLC.m4p" ".m4v:VLC.m4v" ".mid:VLC.mid" ".mka:VLC.mka" ".mkv:VLC.mkv" ".mng:nomacs.mng.3" ".mos:nomacs.mos.3" ".mov:VLC.mov" ".MP2:VLC.mp2" ".mp2v:VLC.mp2v" ".mp3:VLC.mp3" ".mp4:VLC.mp4" ".mp4v:VLC.mp4v" ".mpa:VLC.mpa" ".MPE:VLC.mpe" ".mpeg:VLC.mpeg" ".mpg:VLC.mpg" ".mpo:nomacs.mpo.3" ".mpv2:VLC.mpv2" ".mts:VLC.mts" ".pbm:nomacs.pbm.3" ".pcx:nomacs.pcx.3" ".pgm:nomacs.pgm.3" ".png:nomacs.png.3" ".pns:nomacs.pns.3" ".ppm:nomacs.ppm.3" ".psb:nomacs.psb.3" ".psd:nomacs.psd.3" ".ra:VLC.ra" ".raf:nomacs.raf.3" ".ram:VLC.ram" ".rmi:VLC.rmi" ".roh:nomacs.roh.3" ".s3m:VLC.s3m" ".snd:VLC.snd" ".svg:nomacs.svg.3" ".tga:nomacs.tga.3" ".tif:nomacs.tif.3" ".TS:VLC.ts" ".TTS:VLC.tts" ".vec:nomacs.vec.3" ".voc:VLC.voc" ".wav:VLC.wav" ".wbmp:nomacs.wbmp.3" ".webp:nomacs.webp.3" ".wma:VLC.wma" ".wmv:VLC.wmv" ".WPL:VLC.wpl" ".wvx:VLC.wvx" ".x3f:nomacs.x3f.3" ".xbm:nomacs.xbm.3" ".xm:VLC.xm" ".xpm:nomacs.xpm.3" ".zpl:VLC.zpl" ".xml:txtfilelegacy"
	)
)