I'm currently having a file I want to open using a program. The system does NOT have the file-extension associated with said program. However using the standard "let me choose what program to use" box when trying to open the file and selecting the program it runs just fine. (keep in mind I never enable "always open file with this program".. as I can't be sure my target clients have the file asosciation on their system...
Sooo I was trying this:
ShellExecute(Handle, nil, PChar(dir\myprogram.exe'), PChar(dir\dir\myfile.upx'), nil, SW_SHOWNORMAL);
This does not work however :( It seems to be just opening "myprogram.exe" without loading "myfile.upx"...
Again, manually double clicking myfile.upx and choosing myprogram.exe to open it it works 100% perfect... but I need delphi to do whatever windows is doing there itself on runtime... and again, I can't just make a file associassion and then use shellexecute as it has to work even if .upx isn't a registered extension to anything in Windows..