اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

ترجمة كود من ال c الى الاكسس


sandanet

الردود الموصى بها

السلام عليكم ورحمة الله تعالى وبركاته 

 

اساتذتي الكرام تحية طيبة وبعد ،،

 

هل يمكن ترجمة الكود الموجود في هذه الصفحة الى الاكسس  http://stackoverflow.com/questions/29750894/how-to-retrieve-wmi-data-such-as-uuid-from-a-c-sharp-program

تحياتي

  • Like 1
رابط هذا التعليق
شارك

وعليكم السلام ورحمة الله وبركاته

الوظيفة التالية تعيد قيمة (UUID) للمنتج

Function UUID()
    On Error Resume Next
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct", , 48)
    
    For Each objItem In colItems
        UUID = objItem.UUID
    Next

End Function

 

إذا  كنت بحاجة إلى معرف كامل البيانات التي يعيها المجال (Win32_ComputerSystemProduct) استخدم الإجراء التالي

Sub ComputerSystemProduct()
    On Error Resume Next
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct", , 48)
    For Each objItem In colItems
        Debug.Print "Caption: " & objItem.Caption
        Debug.Print "Description: " & objItem.Description
        Debug.Print "IdentifyingNumber: " & objItem.IdentifyingNumber
        Debug.Print "Name: " & objItem.Name
        Debug.Print "SKUNumber: " & objItem.SKUNumber
        Debug.Print "UUID: " & objItem.UUID
        Debug.Print "Vendor: " & objItem.Vendor
        Debug.Print "Version: " & objItem.Version
    Next
End Sub

 

SCRIPTING.zip

تم تعديل بواسطه أبو إبراهيم الغامدي
  • Like 4
رابط هذا التعليق
شارك

اشكرك جزيل الشكر أخي ابو ابراهيم :biggrin:.. جاري تجربة الكود 

لكن حسب رأيك الشخصي ماهو تعريفك لـ "UUID" ؟؟ وهل هو فريد وثابت لكل جهاز ام ماذا؟

 

تحياتي

تم تعديل بواسطه sandanet
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information