how to write motherboard id into output file in plain text somewhere in windows desktop

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<div style="color:Black;background-color:White; <pre>
hi
I know this script [below] gives the pc motherboard number ,...well I would <span style="color:Blue; like <span style="color:Blue; to know how <span style="color:Blue; to write the result number <span style="color:Blue; as plain text somewhere <span style="color:Blue; in the windows, <span style="color:Blue; in a folder, <span style="color:Blue; or registry , <span style="color:Blue; or <span style="color:Blue; in a harddisk volume,...

I know I could use

FileSystemObject CreateTextFile

I dont know how <span style="color:Blue; to insert it <span style="color:Blue; in the code , I tried but it gives <span style="color:Blue; me <span style="color:Blue; error


Code:
---------------------
strServer = <span style="color:#A31515; "."

<span style="color:Blue; Set objWMI = GetObject(<span style="color:#A31515; "winmgmts://" & strServer & <span style="color:#A31515; "/rootcimv2")
<span style="color:Blue; Set objInstances = objWMI.InstancesOf(<span style="color:#A31515; "Win32_BaseBoard",48)

<span style="color:Blue; On <span style="color:Blue; Error <span style="color:Blue; Resume <span style="color:Blue; Next
<span style="color:Blue; For <span style="color:Blue; Each objInstance <span style="color:Blue; in objInstances
<span style="color:Blue; With objInstance
WScript.Echo .SerialNumber
<span style="color:Blue; End <span style="color:Blue; With
<span style="color:Blue; On <span style="color:Blue; Error <span style="color:Blue; Goto 0
<span style="color:Blue; Next

--------------------
[/code]

View the full article
 
Back
Top