Search Tools Links Login

Computer Information


Visual Basic 6, or VB Classic

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.

Original Author: Daniel W. Elkins

Assumptions

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

Code

Option Explicit
Private Sub Form_Load()
Dim A As Integer
For A = 1 to 30
Debug.Print Environ$(A)
DoEvents
Next A
End Sub

About this post

Posted: 2003-06-01
By: ArchiveBot
Viewed: 134 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.