Set portable software as default program in Windows 10
Recently when setting a new windows 10, I found that every methods setting desired portable software as default program for specific file tye don’t work.
Those conventional methods which worked in windows 7 before don’t work anymore, include:
1. changed the opened program on right click — context menu with “always use the App to open…”
2. changed the default program on file right click -> properties -> open with
3. setting in default App setting -> choose default apps for file type
4. use the old windows XP or 7 default program setting panel (They are not available anymore in build 1803)
After days researching, I found these 2 pages discuss similar issues:
* https://www.ghacks.net/2016/02/16/how-to-make-any-program-the-default-on-windows-10/
* https://commandwindows.com/assoc.htm
The former one mentioned that “ you cannot set portable programs as the default application in Windows 10 using the menu”.
Oh, god. I used to put my own software kits in personal folders with portable version, rather than system folder.
Those 2 articles provide 2 similar way to manually set a portable app for specified file type.
Method 1:(Provided from second article)
Using the commands — assoc and ftype
First, open the command line enviroment and find the current setting for current file using assoc
assoc .txt
Here I get the output
.txt=txtfile
Second, set the association to desired program path
ftype txtfile="G:\Program Files\Windows NT\Accessories\wordpad.exe" "%1"
Noting that he “%1” is nessesary to bring the file as input to open the program.
Then, every time you click the file, you will open the desired program to open the file
Method 2: using the Nirsoft’s FileTypesMan
Download this useful progrma, open it, and find the target filetype(shown below):

In the lower area, click on the “open” entry, end edit hte open way (shown below)

And edit the command-line path with desired program position, also remember to add “%1” to set file name as input for the program, like below:

And next time clicking on the file should open with assigned program.