by Daniel W. Elkins (10 Submissions)
Category: Complete Applications
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating:
(3 Votes)
This simply uses the built-in Environ() function to return useful information about your computer. I've found it useful in several applications that I've made. I'm sure almost everyone has learned this, but if you haven't, it's definately something you should.
Assumes
These are the results I got in this exact order.
ALLUSERSPROFILE
APPDATA
CLIENTNAME
CommonProgramFiles
COMPUTERNAME
ComSpec
HOMEDRIVE
HOMEPATH
include
LOGONSERVER
MSDevDir
NUMBER_OF_PROCESSORS
OS
Path
PATHEXT
PROCESSOR_ARCHITECTURE
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
ProgramFiles
SESSIONNAME
SystemDrive
SystemRoot
TEMP
TMP
USERDOMAIN
USERNAME
USERPROFILE
windir
Option Explicit
Private Sub Form_Load()
Dim A As Integer
For A = 1 to 30
Debug.Print Environ$(A)
DoEvents
Next A
End Sub