Think I found the problem. Turns out there are many files on my system with the same name as the executable I'm trying to associate with. These are all older versions of the same program in other folders. Windows doesn't like that. If I give the executable a unique name, it solves the problem.