Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mapping and Unmapping
Message
De
17/09/1998 12:47:55
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00137678
Message ID:
00137868
Vues:
22
>>>>>That works great. Now, how do make the new drive mapping part of the search path?
>>>>
>>>>Aye, there's the rub.
>>>>
>>>>Well, how about RUNning a DOS set path ... no, that was the original problem.
>>>>I can only suggest that you add a path entry to say... T: in your path, then as you map the drives that you want to search , always use T:
>>>
>>>That's the problem. I am at the mercy of a NW Login script, and I have to find a way to do this so the new setting scopes to the currect command session environment. So I am hoping to find a DLL way of doing this.
>>
>>Why not jsut rewrite the DOS PATH environment string. You need to make sure that you don't exceed the total space allotted to the environment string space, but the API calls are pretty trivial.
>
>Yeah, but I am looking for the DLL code to add this drive mapping to the PATH environment string.

Try the API call SetEnvironmentVariable, which prototypes as:


DECLARE SHORT SetEnvironmentVariable IN WIN32API ;
STRING lpName, ;
STRING lpValue

lpName should be the name of the environment variable to set (in this case, "PATH"), and lpValue should be the full path value to set, null-terminated. This only sets the enviroment variable in the context of the current process.
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