Progged programming site

Programming source code, articles, tutorials, links and chat

Find freelance programmers at ScriptLance.com - Search worldwide

Get the Windows XP serial number

This example shows how to list the serial number for your installed copy of Windows XP, you need to add a textbox caled TextBox1 to a form in this example

Sub WindowsSerial()

strComputer = “.”
Set objWMIService = GetObject(”winmgmts:\\” & strComputer & “\root\cimv2″)
Set colItems = objWMIService.ExecQuery(”Select * from Win32_OperatingSystem”, , 48)
For Each objItem In colItems
Text1.Text = objItem.SerialNumber
Next
End Sub

Private Sub Form_Load()
WindowsSerial
End Sub

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Sponsors