Windows 7 file extension association

后端 未结 4 1554
心在旅途
心在旅途 2021-02-06 05:59

I am referring specifically to windows 7.

I have code that associates a certain extension with my application as proposed by webJose on the following page: What registry

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-06 06:30

    Also on Windows 10, this command can't work:

    Reg.exe delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.m4v" /f
    

    The solution is to delete the SID key by running a BAT file under TrustedInstaller (with NSudo, PowerRun, etc):

    for /f "delims=\ tokens=2" %%A in ('reg query hku ^| findstr /i "S-1-5-21-" ^| findstr /v /i "_Classes"') do set SID=%%A
    Reg.exe delete "HKU\%SID%\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.m4v" /f
    

    P.S.: Thanks to @SecurityAndPrivacyGuru for sharing the SID detection command.

提交回复
热议问题