Short version:
It is likely the registry already registered your program as a file handler, and the reference in the registry is wrong. So, go change it.
Longer version:
I moved some programs files because my hard drive is getting full. In particular, I moved PDF-XChange Viewer, which (sort of) works as a portable app in since I can just move the program directly and the program still runs.
However, perhaps because I have been using it as the default PDF file viewer, it no longer works as the default app when I double click on PDFs.
The standard method to fix this is to set the program as the default file hander for PDF again. But, when I go through the steps and try to select the PDFXCview.exe file as a possible file handler for PDF files, it won't show up as a selectable option.
Following the instructions here (at https://answers.microsoft.com/en-us/windows/forum/windows_7-files/problems-with-file-association-in-windows-7-64-bit/8a84fcec-22df-4942-8e35-d98dbe96e327) fixes it for me. Basically, because it was already the default PDF file handler, it always has an entry at HKEY_CLASSES_ROOT\Applications\PDFXCview.exe\shell\open\command. I have to go there, and update the registry key to reference the new location of the EXE file. After doing then, I try setting the default program for PDF files again, and I can finally select PDF-XChange Viewer as the default viewer.