Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where are OCX files on my machine?
Message
De
29/04/1999 23:17:20
 
 
À
29/04/1999 21:49:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00213739
Message ID:
00213753
Vues:
33
>OCX files usually physically reside in the System or System32 subdirectory. How can I find out under program control where the OCXs reside? (The platform is VFP 6.0 and WinNT/4.0 or Win95 or Win98.)
>

If all you need is the location of the Windows system directory for a given machine, the Win32 API call GetSystemDirectory() works regardless of the platform. I've posted the code for this several times in the past couple of weeks.

If you have WSH installed on the system, the system directory can be gotten from the SpecialFolders collection of the Wscript.Shell Automation object.

>I need to know this because: if the program determines that an active x control is not registered, the program has to copy the ocx file from the server to the workstation, and the program has to know to which subdirectory to copy the ocx.
>
>Let's assume the program knows where to find the ocx on the server.
>
>Another question: on my WinNT/4.0 machine, I have ocxs in both the System and the System32 subdirectory. Why is this? It seems WinNT would want them in just one subdirectory.
>

Actually, as long as the .OCX has ben registered on the system, Windows doesn't much care about the directory it's in - the exact location of the currently registered version of any given OLE Server or ActiveX control is stored in the registry.

>Thanks, Chaim
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform