Is it possible check software serial numbers for legal? Windows, Office, etc. Is soft vendors supports some API for that?
Hi Sergey
It is possible to get windows OS serial number via procedure. Regarding vendors supports, Please provide specific software list that you want to get serial numbers .So, we will analyse and get back to you with that.
For start will be enough Windows and MS office.
Hi @Sergey
Please refer attached procedure to get Windows serial number. Software license tracking is a road-map item on ITSM.
20161216-Get-windows-serial-number.json (982 Bytes)
How we can automatically check license is valid?
And do you can put serial number info to device page?
This proc dont get real serial number.
Check this:
Set WshShell = WScript.CreateObject("WScript.Shell")
strDigitalProductId="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"
strOffXPRU="HKLM\SOFTWARE\Microsoft\Office\10.0\Registration\{91110419-6000-11D3-8CFE-0050048383C9}\DigitalProductId"
strXPKey=GetKey(WshShell.RegRead(strDigitalProductId))
'strOffXPRUKey=GetKey(WshShell.RegRead(strOffXPRU))
'CopytoClipboard
'set ie=CreateObject("internetExplorer.application")
'ie.navigate "about:blank"
'do until ie.readystate=4: wscript.sleep 1: loop
'ie.document.parentwindow.clipboardData.setData "Text", strXPKey
'MsgBox "WinXP:"&strXPKey&chr(13)&_
'"key in clipboard"
' "OffXP:"&strOffXPRUKey
Dim fso, tf
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.CreateTextFile("c:\zabbix\os_serial.zbx", True, False)
tf.WriteLine strXPKey
'================================================================================
Function GetKey(rpk)
Const rpkOffset=52:i=28
szPossibleChars="BCDFGHJKMPQRTVWXY2346789"
Do 'Rep1
dwAccumulator=0 : j=14
Do
dwAccumulator=dwAccumulator*256
dwAccumulator=rpk(j+rpkOffset)+dwAccumulator
rpk(j+rpkOffset)=(dwAccumulator\24) and 255
dwAccumulator=dwAccumulator Mod 24
j=j-1
Loop While j>=0
i=i-1 : szProductKey=mid(szPossibleChars,dwAccumulator+1,1)&szProductKey
if (((29-i) Mod 6)=0) and (i<>-1) then
i=i-1 : szProductKey="-"&szProductKey
End If
Loop While i>=0 'Goto Rep1
GetKey=szProductKey
End Function
And your proc gives results separated. Is it possible to create single report alert for all PCs? When proc run at all PCs.