Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find Files
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00765698
Message ID:
00766091
Vues:
29
That is what we decided on. A drive search would also come handy for some other purpose I guess.


>>I need to locate the WinZip dir if it exists. Which API is used for a file search?
>
>One way to do this by looking in the registry for the location of WinZip32.exe, like this:
>
>
#DEFINE HKEY_LOCAL_MACHINE          -2147483646  && BITSET(0,31)+2
>* lcWinZipKey is the expected location of the registry key
>lcWinZipKey = "Software\Microsoft\Windows\CurrentVersion\app paths\winzip32.exe" && In the HKLM hive.
>LOCAL oReg, lcValue, lnErrorCode
>oReg = NewObject( "Registry", HOME(1) + "FFC\Registry.VCX")
>IF oReg.IsKey( lcWinZipKey, HKEY_LOCAL_MACHINE)
>   lcValue = ""
>   lnErrorCode = oReg.GetRegKey( "", @lcValue, lcWinZipKey, HKEY_LOCAL_MACHINE)
>   RETURN IIF( lnErrorCode = 0, lcValue, NULL)
>ELSE
>   RETURN NULL
>ENDIF
>
>
>-Rick
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform