Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Win Function to return program needed by file extension?
Message
De
11/11/2016 16:42:55
 
 
À
11/11/2016 14:44:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Divers
Thread ID:
01643218
Message ID:
01643231
Vues:
48
https://www.berezniker.com/content/pages/visual-foxpro/retrieve-name-exe-associated-file-extension

However, why do you need it? You can simply Run the file as long as you include the full path and the extension. And if you use ShellExec() instead of Run, you won't see the DOS window.

>Hi all,
>
>Is there a Windows function that would return the app needed for a file of a certain file extension? e.g. pass into it ".pdf" and it returns the full path the the Acrobat reader which I can then fire up with:
>
>RUN /N &lcAcrobatPath &lcDocFileName
>
>(where lcDocFileName contains the full path to a file name)
>
>I currently have a function that gets the information for Acrobat from a registry entry - but it only does .pdf files What I would prefer is something where I pass it an extension and Windows comes back with the name of the program that is supposed to open this file and/or the full file path. I then would use it to fire up the document they are pointing to.
>
>Thanks,
>Albert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform