Announcement

Collapse
No announcement yet.

Using long filenames with a file association

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using long filenames with a file association

    I have used ModifyRegistryKey() to set up a file association between the file extension (.bcf) and our application (classpharmer.exe). In summary:

    HKEY_CLASSES_ROOT\.bcf : Bioreason.File
    HKEY_CLASSES_ROOT\Bioreason.File\shell\open\comman d : %AppDir%\classpharmer.exe "%1"
    HKEY_CLASSES_ROOT\Bioreason.File\DefaultIcon : %AppDir%\classpharmer.exe,0

    Everything works fine EXCEPT when I click on a file, the short (i.e. 8.3) name is used rather than the long name. Can anyone share some insight on how to get the application to launch using the long filename?

    Thank you,
    Frank LaFond

  • #2
    Re: Using long filenames with a file association

    I think I've got it. It turns out that %AppDir% is likely to have spaces in it (i.e. "Program <space> Files") and hence the:

    %AppDir%\classpharmer.exe needs to have quotes around it as well as the %1. Once the extra quotes were added, long file names are used.

    Frank.

    Comment

    Working...
    X