CISA FotoGallery

Statistiche

Tot. visite contenuti : 928191
Home Articoli tecnici Moduli Usare la Funzione ENVIRON

Usare la Funzione ENVIRON


'------------------------------------------------------------------------------------------
'FUNZIONE PER ESTRARRE LA LISTA DI VARIABILI SUPPORTATE DA "ENVIRON"
'Alessandro Baraldi
'------------------------------------------------------------------------------------------

Option Compare Database
Option Explicit

Function VariablesEnvironnement()

Dim strEnviron As String
Dim Indx As Integer
Dim pos As Integer

Indx = 1
strEnviron = Environ(Indx)
Do While strEnviron <> ""
pos = InStr(1, strEnviron, "=")
Debug.Print Indx & " : Environ(""" & Left(strEnviron, pos - 1) & """) = " & _
Right(strEnviron, Len(strEnviron) - pos)
Indx = Indx + 1
strEnviron = Environ(Indx)
Loop
End Function

'------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------


1 : Environ("ALLUSERSPROFILE") = C:\Documents and Settings\All Users
2 : Environ("APPDATA") = C:\Documents and Settings\Administrator\Dati applicazioni
3 : Environ("CommonProgramFiles") = C:\Programmi\File comuni
4 : Environ("COMPUTERNAME") = IK2ZOK
5 : Environ("ComSpec") = C:\WINNT\system32\cmd.exe
6 : Environ("HOMEDRIVE") = C:
7 : Environ("HOMEPATH") = \Documents and Settings\Administrator
8 : Environ("LOGONSERVER") = \\IK2ZOK
9 : Environ("NUMBER_OF_PROCESSORS") = 1
10 : Environ("OS") = Windows_NT
11 : Environ("Os2LibPath") = C:\WINNT\system32\os2\dll;
12 : Environ("Path") = C:\Programmi\Microsoft Office\Office\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Programmi\Microsoft SQL Server\80\Tools\Binn\;C:\PROGRA~1\FILECO~1\AUTODE~1
13 : Environ("PATHEXT") = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
14 : Environ("PROCESSOR_ARCHITECTURE") = x86
15 : Environ("PROCESSOR_IDENTIFIER") = x86 Family 6 Model 8 Stepping 3, GenuineIntel
16 : Environ("PROCESSOR_LEVEL") = 6
17 : Environ("PROCESSOR_REVISION") = 0803
18 : Environ("ProgramFiles") = C:\Programmi
19 : Environ("SystemDrive") = C:
20 : Environ("SystemRoot") = C:\WINNT
21 : Environ("TEMP") = C:\DOCUME~1\ADMINI~1\IMPOST~1\Temp
22 : Environ("TMP") = C:\DOCUME~1\ADMINI~1\IMPOST~1\Temp
23 : Environ("USERDOMAIN") = IK2ZOK
24 : Environ("USERNAME") = Administrator
25 : Environ("USERPROFILE") = C:\Documents and Settings\Administrator
26 : Environ("windir") = C:\WINNT