1.
Environment.getfolderpath (Environment.SpecialFolder)Environment.SpecialFolder.ApplicationFolder is the path to the roaming folder
2. Environment.getenvironmentvariable (String)types of support that can be traversed:
foreach (DictionaryEntry de in Environment.getenvironmentvariables ()) &NB Sp { Console.WriteLine (" {0} = {1}", DE. Key, DE. Value); } type: path = D:\Program Files\sun\ophone sdk\tools;d:\p Rogram Files\sun\android-sdk-windows-1.5_r2\tools;d:\program files\sun\sdk\jdk\bin;d:\program Files\Sun\SDK \jdk\jre\bin; E:\oracle\ora92\bin; C:\Program Files\oracle\jre\1.3.1\bin; c:\program files\oracle\jre\1.1.8\bin; C:\WINDOWS\system32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C:\Program Files\intel\dmix; C:\program files\microsoft SQL server\90\tools\binn\;D: \program Files\codesmith\v5.0\;D: \Program Files\ symantec\pcanywhere\; C:\program files\ixia\ixchariot;d:\program files\sun\sdk\bin; TEMP = c:\docume~1\gmj\locals~1\temp SessionName = console Pathext =. COM;. EXE;. BAT;. CMD;. VBS;. VBE;. JS;. JSE;.WSF;. wsh UserDomain = ever62 Processor_architecture = x86 systemdrive = c: APPDATA = C:\Documents and S Ettings\gmj\application data Jserv = e:\oracle\ora92/apache/jserv/conf windir = C:\WINDOWS _ACP_ INCLUDE = D:\Program Files\Microsoft Visual Studio 8\vc\include;d:\program Files\Microsoft Visual Studio 8 \vc\ Atlmfc\include;d:\program Files\Microsoft Visual Studio 8\vc\platformsdk\include;d:\program Files\Microsoft Visual Studio 8 \sdk\v2.0\include TMP = c:\docume~1\gmj\locals~1\temp userprofile = C:\Documents and Settings \gmj programfiles = C:\Program files Fp_no_host_check = no HomePath = \documents and Settings\gmj COMPUTERNAME = ever62 _acp_path = D:\Program Files\Microsoft Visual Studio 8\vc\bin;d:\program Files\Microsoft Visu Al Studio 8 \vc\platformsdk\bin;d:\program Files\Microsoft Visual Studio 8\common7\tools\bin;d:\program Files\ Microsoft Visual Studio 8 \COMMON7\TOOLS;D:\PROgram Files\Microsoft Visual Studio 8\Common7\IDE; C:\Program files\html help Workshop;d:\program files\microsoft Visual Studio 8\sdk\v2.0\bin; C:\windows\microsoft.net\framework\v2.0.50727;d:\program Files\Microsoft Visual studio 8\;D: \Program Files\ Microsoft Visual Studio 8\\sdk\v2.0\bin; C:\windows\syswow64;d:\program Files\Microsoft Visual Studio 8\team tools\static analysis Tools\FxCop\;D: \ Program Files\sun\ophone Sdk\tools;d:\program Files\sun\android-sdk-windows-1.5_r2 \tools;d:\program Files\ Sun\sdk\jdk\bin;d:\program Files\sun\sdk\jdk\jre\bin; E:\oracle\ora92\bin; c:\program files\oracle\jre\1.3.1\bin; C:\Program Files\oracle\jre\1.1.8\bin; C:\WINDOWS\system32; C:\WINDOWS; c:\windows\system32 \wbem; C:\Program Files\intel\dmix; C:\Program Files\Microsoft SQL server\90\tools\binn\;D: \program Files\codesmith\v5.0 \;D: \program Files\ symantec\pcanywhere\; C:\Program files\ixia\ixchariot;d:\program files\sun\sdk\bin; USERNAME = gmj Number_of_proceSsors = 2 Processor_identifier = x86 Family 6 Model Stepping 6, genuineintel _acp_lib = D:\Program Files\mi Crosoft Visual Studio 8\vc\lib;d:\program Files\Microsoft Visual Studio 8 \vc\atlmfc\lib;d:\program Files\ Microsoft Visual Studio 8\vc\atlmfc\lib\i386;d:\program Files\Microsoft Visual Studio 8 \vc\platformsdk\lib;d:\ Program Files\Microsoft Visual Studio 8\sdk\v2.0\lib;d:\program Files\Microsoft Visual Studio 8 \;D: \program Files \microsoft Visual Studio 8\lib wecversionforrosebud.da8 = 2 SystemRoot = c:\windows ComSpec = C:\WINDOWS \system32\cmd.exe LogonServer = http://www.cnblogs.com/xinyuxin912/*** VS80COMNTOOLS = D:\Program Files\ Microsoft Visual Studio 8\common7\tools\ _acp_atlprov = D:\Program Files\Microsoft Visual Studio 8\vc\bin\ atlprov.dll wv_gateway_cfg = e:\oracle\ora92\apache\modplsql\cfg\wdbsvr.app CommonProgramFiles = c \ Program Files\Common files Processor_level = 6 processor_rEvision = 1706 CLIENTNAME = console AllUsersProfile = C:\Documents and Settings\All users Vs90comntools = D:\Program Files\Microsoft Visual Studio 9.0\common7\tools\ OS = windows_nt homedrive = C:
. NET Get Path