Cassiano

Saber Serial da Placa Mãe

1 post in this topic

Código abaixo pra saber nr de série da placa mãe.

objLocator is object Automation "WbemScripting.SWbemLocator"
objService is object Automation dynamic
Results is object Automation dynamic
WHEN EXCEPTION IN
	objService = objLocator>>ConnectServer(".", "root\cimv2")
	objService>>Security_>>ImpersonationLevel = 3
	// Motherboard infos
	Results = objService>>ExecQuery("SELECT Manufacturer, Product, Version, SerialNumber FROM Win32_BaseBoard")
	FOR x = 0 _TO_ Results>>Count -1
		Trace("Manufacturer : ",Results>>ItemIndex(x)>>Properties_("Manufacturer")>>Value )
		Trace("Product : ",Results>>ItemIndex(x)>>Properties_("Product")>>Value )
		Trace("Version : ",Results>>ItemIndex(x)>>Properties_("Version")>>Value )
		Trace("SerialNumber : ",Results>>ItemIndex(x)>>Properties_("SerialNumber")>>Value )
		Trace("=========================")
	END
DO
	Error("Erreur execution WMI",ExceptionInfo(errInfo))
	ExceptionEnable()
END
RETURN

8hxKHnJ.png

2 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now