Page 1 of 1 1
Topic Options
#146258 - 2005-08-23 04:05 PM Get Information about NetworkCard and Mainboard
adamix Offline
Lurker

Registered: 2005-08-11
Posts: 3
can help me somebody? I am looking for Script or UDF for reading the Information about NetworkCard and Mainboard
Top
#146259 - 2005-08-23 04:12 PM Re: Get Information about NetworkCard and Mainboard
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Maybe KiXomatic can help?
Top
#146260 - 2005-08-23 04:51 PM Re: Get Information about NetworkCard and Mainboard
snake Offline
Fresh Scripter

Registered: 2005-08-22
Posts: 30
Loc: Germany
hi adamix

you can use wmi

on this link you can find much wmi scripts in VB but its very easy to compile it to kix

i can help u when you have questions about the compile to kix

http://www.microsoft.com/technet/scriptcenter/scripts/hardware/default.mspx


Edited by snake (2005-08-23 04:52 PM)

Top
#146261 - 2005-08-23 07:46 PM Re: Get Information about NetworkCard and Mainboard
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Quote:

i can help u when you have questions about the compile to kix




I have a question. How do you compile it to KiXtart? I thought you just converted it.

Top
#146262 - 2005-08-23 09:32 PM Re: Get Information about NetworkCard and Mainboard
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
I had the same thought. Webopedia definition for compile.
Top
#146263 - 2005-08-24 09:24 AM Re: Get Information about NetworkCard and Mainboard
snake Offline
Fresh Scripter

Registered: 2005-08-22
Posts: 30
Loc: Germany
ok ok ok :-) your right ;-)

my english is bad and my grammar is horrible i know

but you understand it :-)

and i only want to help him ;-)

Top
#146264 - 2005-08-24 12:56 PM Re: Get Information about NetworkCard and Mainboard
snake Offline
Fresh Scripter

Registered: 2005-08-22
Posts: 30
Loc: Germany
adamix you have mail
Top
#146265 - 2005-08-24 08:53 PM Re: Get Information about NetworkCard and Mainboard
BoxKite Offline
Da Box
*****

Registered: 2000-05-17
Posts: 282
Loc: Vacaville,CA,USA
Hey adamix; WMI is defiantly the way to go. I use it in my login script to collect information as the user logs in. I use WMI applets to collect information into different files. I create a hardware information file, software file, and network file.

Each file is created in a shared location on the network where the user has read/write permissions, i.e. \\servername\sharename$. Notice I made the share hidden. This way a user will not know it exists and try to delete the files. The files are named to reflect their use, i.e. SW_000D56BE118A.txt. This is a file containing software information. Notice I used the MAC address instead of the computer name in the file naming. This is because the MAC will always be the same, while a computer name can change. The MAC address is only affected if you change out the NIC card or motherboard if the NIC is build-in.

You have to create a Kix program to read the files and put all that information in a single text file.

Finally, I use Microsoft Access to import the various files and I have established a relationship between files using the MAC address.

Simple YES.

Here is a sample Kix/WMI I use to collect product information, and the program I use to read the information into a text file. NOTE: Sometime I have to use unique delimiters (|) in my text file. This is because sometimes, the information retrieved by WMI will give data that have the standard delimiters (.-,-/-#) in the data string.

Code:
dim $record[3]
$objWMIService = GetObject("winmgmts:\\.\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct")
For Each $objItem in $colItems
$record[1] = $objItem.IdentifyingNumber ;Computer Serial Number
$record[2] = $objItem.Name ;Computer Model
$record[3] = $objItem.Vendor ;OEM Name
Next
$objWMIService=0
$send = “$record[1],$record[2],$record[3]”
Shell “%comspec% /c echo $send > \\servername\sharename$\WSID_@address.txt”



Code:
del "\\ servername\sharename$\SW_@address.txt"
open(1,"\\servername\sharename$\SW_@address.txt",5)
$objWMIService = GetObject("winmgmts:\\.\root\cimv2")
$SW = $objWMIService.ExecQuery("Select * from Win32_Product")
for each $Item in $SW
$y = "@WkSta|" + $Item.Description + "|" + $Item.Name + "|" + $Item.SKUNumber + "|" +
$Item.Vendor + "|" + $Item.Version + "|" + @DATE + @crlf
$y = "@address|" + $y
writeline(1,"$y")
next
close(1)
$objWMIService=0



A sample file is needed to collect the software information (a small change is needed for the hardware file) information into a text file.


Code:
del "\\ servername\sharename$\sw_info.txt"
open(1," \\ servername\sharename$\sw_info.txt",5)
$file = dir("sw_*")
while $file <> "" and @error = 0
open(2,"$file")
$line = readline(2)
while $line <> "" and @error = 0
if left("$line",13) <> "computer name"
at(7,15) "$count"
writeline(1,"$line" + @crlf)
endif
$line = readline(2)
$count = $count + 1
loop
close(2)
$file = dir()
loop
close(1)

_________________________
Box
FACTA NON VERBA

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org