by Bharat Nagarajan (2 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 17th July 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
To retrieve system info we use all kinda code but there is a function in VB 6.0 called Environ which makes our lives bit easy
'Will popup a message box displaying your computer name
MsgBox(environ("computername"))
'Like that we can get it for the variables like
'ALLUSERSPROFILE()
'APPDATA()
'CommonProgramFiles()
'COMPUTERNAME()
'ComSpec()
'HOMEDRIVE()
'HOMEPATH()
'LOGONSERVER()
'NUMBER_OF_PROCESSORS()
'OS()
'Os2LibPath()
'Path()
'PATHEXT()
'PROCESSOR_ARCHITECTURE()
'PROCESSOR_IDENTIFIER()
'PROCESSOR_LEVEL()
'PROCESSOR_REVISION()
'ProgramFiles()
'SystemDrive()
'SystemRoot()
'TEMP()
'TMP()
'USERDOMAIN()
'USERNAME()
'USERPROFILE()
'windir()
End Sub
No comments have been posted about To retrieve system info we use all kinda code but there is a function in VB 6.0 called Environ whic. Why not be the first to post a comment about To retrieve system info we use all kinda code but there is a function in VB 6.0 called Environ whic.