Extracting environment variables 
Author Message
 Extracting environment variables

Hi,

How do i extract the physical path to windows variables like %USERPROFILE%
in VB .Net, that i could do with the old shell object method
"ExtractEnvironmentVariable"  ??

Many thanks

Regards

Niclas



Sun, 31 Jul 2005 22:03:49 GMT  
 Extracting environment variables
System.Environment.GetEnvironmentVariable

or

System.Environment.GetEnvironmentVariables


Quote:
> Hi,

> How do i extract the physical path to windows variables like %USERPROFILE%
> in VB .Net, that i could do with the old shell object method
> "ExtractEnvironmentVariable"  ??

> Many thanks

> Regards

> Niclas



Sun, 31 Jul 2005 22:11:52 GMT  
 Extracting environment variables
Found the solution myself, Thanks anyway !

Dim env As Environment
Dim myPath As String = env.ExpandEnvironmentVariables("%USERPROFILE%")

Niclas


Quote:
> Hi,

> How do i extract the physical path to windows variables like %USERPROFILE%
> in VB .Net, that i could do with the old shell object method
> "ExtractEnvironmentVariable"  ??

> Many thanks

> Regards

> Niclas



Sun, 31 Jul 2005 22:15:21 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Extracting characters from one variable and assigning to another variable

2. Extracting information from a Date variable

3. Extracting SUBSTRINGS to string variables

4. Extracting Variables From Text

5. Extracting value from variable

6. help extracting word from a variable (ASP) !!!!

7. Environment variable...

8. Write Environment Variables

9. Environment Variables

10. Environment Variables

11. querying environment variables from vba

12. WORD Environment Variables

 

 
Powered by phpBB® Forum Software