Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP7 - Just noticed that...
Message
De
04/10/2000 09:17:57
 
 
À
04/10/2000 07:46:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00423357
Message ID:
00424643
Vues:
17
>>I haven't followed all of this thread, but I gather we're trying to clear the commands in the command window that show at startup? In that case, why not just clear out _command.prg (in x:\documents and settings\...) before shutdown?
>
>'Cause I didn't know that's where it was stored, of course. <g> That ought to do it. Something like StrToFile("","_command.prg"). Do we have a system variable that points to the file?
>

Tamar,

MS did something -very- neatly in the move to Win98 and Win2K, and provided for the Win95/NT people, too. They defined a set of CSIDLs - Common System Identifier Locations - and added a new set of API calls to retrieve the folders associated with them, like SHGetFolderLocation, SHGetFolderPath, SHGetSpecialFolderLocation, and SHGetSpecialFolderPath, and then provided a .DLL that can be dropped onto existing older systems called SHFOLDER.DLL, that's freely redistributable, does not require any special treatment other than to place it in the Windows search path, and implements at least a major subset of the CSIDL sets for the older OSes. Take a look in the MSDN Library under the topic "CSIDL Values" to get a good idea of the capability. Installing based on CSIDLs allows you to install to a commonly reference-able point on all systems without pointing to the exact same folder on all systems - install to an appropriate subfolder of a CSIDL, and then get the current system's CSIDL folder equivalent and append the subfolder; regardless of where the CSIDL points for this system/user, it's always where you point!

This is the underlying basis for the WSH's Wscript.Shell SpecialFolders collection; it does not require deployment of the WSH, only adding SHFolder.DLL to a folder in the Windows search path, no registration, and it automagically adjusts for the available services on your system - obviously, Win9x doesn't have an AllUsersDesktop, so it returns a null string, and then retrieve the cureent user's Desktop instead. This mechanism is exploited by lots of things - the Windows Installer (the thingie behind the O2K and Win2K installs, and the VSI) is the classic example.
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