How do i get the company name of the computer ?

http://www.freevbcode.com/ShowCode.asp?ID=4571

usage:

VB.NET:
[size=2][color=#0000ff] [size=2][color=#0000ff]
Dim[/color][/size][size=2][color=#000000] myClas [/color][/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#000000] clsWMI = [/color][/size][size=2][color=#0000ff]New[/color][/size][size=2][color=#000000] clsWMI[/color]
 
MessageBox.Show(myClas.ComputerName)
 
[/size][/color][/size]


Cheers ;)
 
Correct me if I'm wrong, but that code will have OS limitations. I don't believe the WMI works on non-NT based systems without a specific manual download? I don't know which OS's have WMI included or not...
 
kulrom said:
http://www.freevbcode.com/ShowCode.asp?ID=4571

usage:

VB.NET:
[size=2][color=#0000ff] [size=2][color=#0000ff]
Dim[/color][/size][size=2][color=#000000] myClas [/color][/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#000000] clsWMI = [/color][/size][size=2][color=#0000ff]New[/color][/size][size=2][color=#000000] clsWMI[/color]
 
MessageBox.Show(myClas.ComputerName)
 
[/size][/color][/size]


Cheers ;)

Am i missing a imports bro ? :eek:
 
i could have accomplished the same with Environment.MachineName right ?
But, for my school computer ... the machinename and the companyname is different. So, how would i go about getting the companyname ?
 
kulrom said:
As article says it demonstrates only a small subset of the features within WMI. Play around with it ... let me know if you still cannot find solution by yourself ... Cheers ;)

I'll keep the article for future reference ...

But, i managed to get the result i wanted with Application.CompanyName

Thanks. :)
 
Application.CompanyName is the company name that you as the developer supply when creating the application. It has no relationship whatsoever to the compnay name used when installing Windows on the current machine.
 
Back
Top