I have created a minimalistic pdf viewer using SumatraPDF as an EXE within a my main form.
Everything works fine when I'm debugging it. For the debug test argument, I have a path with spaces, "C:\Path With Spaces\test.pdf", that my program opens fine using SumatraPDF.
To test how it works on my machine, I use the EXE in the Debug folder and make it the default program to open PDFs. When I attempt to open the test pdf file, my program attempts to open these paths and fails:
- "C:\Path"
- "C:\Path With Spaces\With"
- "C:\Path With Spaces\Spaces\test.pdf"
Which leads me to believe that my program is not behaving like other installed programs and treating a filename (with spaces) it is about to open, as one single argument. For example I can set SumatraPDF as the default program and there is no problems opening a filename with spaces.
So my question is (was) does an installed program read arguments differently than an EXE from the debug version?