Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 22nd, 2006, 05:33 AM
Authorized User
 
Join Date: Jan 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default function that looks up computer processor number

good day fellow programmers

  pls i need a function that can look up the following and place the result into a field

1.the computer processor number

2.the computer name.

thanks

 
Old February 23rd, 2006, 02:23 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What do you mean by "processor number?" Is that the serial number or UUID of the PC? Or the CPU Name and/or speed?

This will get you started:

'--------------------------------------
sComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & sComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)
    For Each objItem In colItems
        sSerialNumber = CStr(objItem.IdentifyingNumber)
        sUUID = objItem.UUID
    Next
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
    For Each objItem In colItems
        sComputerName = objItem.Caption
    Next
'----------------------
HTH


mmcdonal
 
Old February 27th, 2006, 07:52 AM
Authorized User
 
Join Date: Jan 2006
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks bros,i will try it out,its the serial nos i want so that my softwares will not be loaded /sold even if unauthorised copies gets into the market

thanks,pls i still need help on packaging an access aplication.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Random Number Function Query rsm42 ASP.NET 1.0 and 1.1 Basics 7 May 16th, 2007 05:04 AM
format-number function problem jeffbk XSLT 8 May 5th, 2007 03:20 AM
Formating xpath function result number ronisc XSLT 4 December 20th, 2006 09:04 AM
function to create whole number from decimal dhx10000 Classic ASP Professional 1 July 18th, 2006 08:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.