hi
i want information about environment when program is executed.
How to get the environment information in VB.NET?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Munesh SharmaRank #697 · 3.4K reputationPosted May 6, 2011, 1:13 AM EDT
imports System.Info.vb
Imports System
Class SystemInfo
Shared Sub main()
Console.WriteLine("")
Console.WriteLine("Current User")
Console.WriteLine(Environment.UserName)
Console.WriteLine("")
Console.WriteLine("Name of the Machine")
Console.WriteLine(Environment.MachineName)
Console.WriteLine("")
Console.WriteLine("OS version")
Console.WriteLine(Environment.OSVersion)
Console.WriteLine("")
Console.WriteLine("System Directory")
Console.WriteLine(Environment.SystemDirectory)
Console.WriteLine("")
Console.WriteLine("TMP Folder")
Console.WriteLine(Environment.GetEnvironmentVariable("TMP"))
Console.WriteLine("")
Console.WriteLine("Class Path")
Console.WriteLine(Environment.GetEnvironmentVariable("ClassPath"))
Console.WriteLine("")
Console.readLine()
End Sub
End Class