>>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.