File Associations And Parameter Passing

In Windows 98, I used to be able to set a file association to an extension type AND have windows pass the name of the file I double clicked on to the program as a command line argument. I can find no way of doing this in Windows 10.

For Example: I have a program called WebLines; it creates and uses file with an extension of .WEBL. In Win98, I could open Windows Explorer, locate a .WEBL file, right-click on it, and tell windows to open it with WebLines.exe. I can also do this in Windows 10, BUT, in Win98 I could also go to the File Types tab, locate the .WEBL extension, right-click and select Properties, and edit the Open With field to read something like "WebLines.exe %1"; this would tell Windows to pass the name of a .WEBL file as a command line parameter to my program WebLines, which could then parse the command line and open the file. I find no way to do this in Windows 10. Other programs are able to do this (WordPad, NotePad, WinAmp, FireFox, etc.), but I can't. Why not???

|
Answer
Answer
Thank you, but I finally found the problem. I dug into the registry to see how parameter passing works for other file types, and why it wasn't working for my file type. I found that when the original association was created, the '%" had been left out of the data value for the "command" keys associated with my file type. I have no idea why that would have happened; I manually deleted all references to my file type and it's associated program (I hate editing the registry, I feel like I'm defusing a bomb with my eyes closed). I then rebooted, went back into Explorer and created the association again; this time it worked. Problem solved.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated June 12, 2021 Views 1,822 Applies to: