Set windows 10 default app via f
2022-01-23 本文已影响0人
JaedenKil
Target: Set default app for specific file type
For instance, I want to set deault app for rar to "7zip", but this cannot be done directly via windows settings, the "7zip" is not listed in the drop-box.
So we can also set the default app via command line.
- Set default app for ".rar" to "7zip"
- Set default app for ".xml" to "nodepad++"
Steps:
- Find where are the two applications exe files are located:
- In the windows search menu, type "7zip", there is the "7zip file manager", right click - open file location:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\7-Zip
- In the new folder, right click on the "7zip file manager", right - property - shortcut, and in my scenario, it shows
D:\Applications\7-Zip\7zFM.exe
- With the same steps, locate the
notapad++
:D:\Applications\NotePad++\notepad++.exe
- In the windows search menu, type "7zip", there is the "7zip file manager", right click - open file location:
- First we can check the current default applications:
-
ftype | findstr xmlfile
:xmlfile="C:\Program Files\Internet Explorer\iexplore.exe" %1
- Run cmd as admin, run command
ftype xmlfile="D:\Applications\NotePad++\notepad++.exe" "%1"
If it succeeds, the output is:xmlfile="D:\Applications\NotePad++\notepad++.exe" "%1"
- Check again:
ftype | findstr xmlfile
:xmlfile="D:\Applications\NotePad++\notepad++.exe" "%1"
- Run the same steps for ".rar":
ftype rarfile="D:\Applications\7-Zip\7zFM.exe" "%1"
Check output:rarfile="D:\Applications\7-Zip\7zFM.exe" "%1"
-
And it's done.