The Environment class provides functions for retrieving information about the local machine


This class cannot be directly instantiated. In order to access the methods, use the class name directly.

 Debug.Print Environment.MachineName
 Debug.Print Environment.UserName

See Also

Project VBCorLib Overview



 EnvironmentVariableTargetUsed to indicate the source or destination of the environment variables when read from or written to the system. 
 SpecialFolderThis enum represents a list of folders accessible using GetFolderPath. These definitions are from the Microsoft Dot NET 1.1 MSDN Library. 


 CommandLine (get)Returns the command specified when executing the current application, including any arguments typed after the application name. 
 CurrentDirectory (get)Returns the current directy of the executing application. 
 CurrentDirectory (let)Sets the current directory for the executing application. 
 MachineName (get)Returns the name of the local computer. 
 NewLine (get)Returns string of a newline character for the local computer. 
 OSVersion (get)Returns an object representing the current operating system. 
 ProcessorCount (get)Returns the number of processors on the current machine. 
 SystemDirectory (get)Returns the System directory for the current OS. 
 TickCount (get)Returns the number of milliseconds the system has been running since it started. 
 UserDomainName (get)Returns the name of the local machine within a domain 
 UserInteractive (get)Determines if the current application is allowed to have user interaction. 
 UserName (get)Returns the name of the currently logged in user of the local computer. 
 WorkingSet (get)Returns the amount of physical memory the current application is allocated. 


 ExpandEnvironmentVariablesReplaces environment tags within a string with the actual values. 
 GetCommandLineArgsReturns an array of parsed Arguments from the command line. 
 GetEnvironmentVariableReturns an environment variable value. 
 GetEnvironmentVariablesReturns an IDictionary object containing all environment variables as name/value pairs. 
 GetFolderPathReturns the path for a specified folder type. 
 GetLogicalDrivesReturns the logical drives installed on the local machine. 
 ParseCommandLineArgsProvides a mechanism to parse arguments from a command line string. 
 SetEnvironmentVariableSets, creates, or deletes an environment variable in the specified region.