Moderators SmOke_N Posted November 19, 2006 Moderators Share Posted November 19, 2006 I am using COM to find the UUID of a computer:Func _GetUUID() Local $colItems, $objWMIService, $objItem, $sObjReturn = '' $objWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct", "WQL", 0x10 + 0x20) If IsObj($colItems) Then For $objItem In $colItems $sObjReturn = $objItem.UUID If $sObjReturn Then ExitLoop Next If $sObjReturn Then If ($sObjReturn <> "00000000-0000-0000-0000-000000000000") And _ ($sObjReturn <> "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") And _ ($sObjReturn <> "11111111-1111-1111-1111-111111111111") Then Return $sObjReturn EndIf EndIf EndIf Return _GetMacUUID() EndFuncoÝ÷ Ù*&zئzËajÚÞ²émën®{I©·*+6ée²Úâ èµç[ÊØ^!ý7êú¹Óé쵫^éíiº/y*-éÈjÛ^m¢ë¶&v·¬±«,¡«¢+Ø)Õ¹}Ñ5UU% ¤(%1½°ÀÌØí½±%ѵ̰ÀÌØí½©]5%MÉÙ¥°ÀÌØí½©%Ñ´($ÀÌØí½©]5%MÉÙ¥ô=©Ð ÅÕ½ÐíÝ¥¹µµÑÌèÀäÈìÀäÈìÅÕ½ÐìµÀì ½µÁÕÑÉ9µµÀìÅÕ½ÐìÀäÈíɽ½ÐÀäÈí %5XÈÅÕ½Ðì¤($ÀÌØí½±%ѵÌôÀÌØí½©]5%MÉÙ¥¹%¹ÍѹÍ= ÅÕ½Ðí]¥¸ÌÉ}9ÑݽÉÁÑÈÅÕ½Ðì¤(%%%Í=¨ ÀÌØí½±%ѵ̤Q¡¸($%½ÈÀÌØí½©%Ñ´%¸ÀÌØí½±%ѵÌ($$%%ÀÌØí½©%Ñ´¹9µôÌäíAÐM¡Õ±È5¥¹¥Á½ÉÐÌäìQ¡¸IÑÕɸÅÕ½ÐìÀÀÀÀÀÀÀÀ´ÀÀÀÀ´ÀÀÀÀ´ÀÀÀÀ´ÅÕ½ÐìµÀìMÑÉ¥¹IÁ± ÀÌØí½©%Ñ´¹5 ÉÍÌ°ÌäìèÌäì°ÌäìÌäì¤($%9áÐ(%¹%(%á¥Ð)¹Õ¹oÝ÷ Ù8b³ +Çâæ¬àjËaz·¢±£ §]ë,aë-z·ZÈÚ)í£h§²Ö§që0êÞ¶PëzÛ«çZ6ée¢±&¦Ü¬¶¸§©Ý¶«{¬ §]ë,Méex&zj+zØZX¤z¢·lm觶§v¯»njW§¾*èg§´Ú0æjYr# .Øî²ØêÚµæPÚÚeiÇ¢¶)íêÞ+-¯&î·Y'£ajجm§Ú¡©òøÇ%¢wJazr,zÚ.¶ÚwZÁ¬«b~Ø^QBÁ« ºYZÚ+jmɩݶ&v·¬³¬6ÞÆ+-z{m¡§]iEÚ-ç.®·§µÊ&¦ë^®Ë-jwZÕ 6«y¦Ú²ÏÛºh§Øb³ .Ù÷öØn®Ö§ÊØb"Ç¢µØm{¬¶Úz§Â+ajwH~§vz-)à¶é¶§Ø}êÞÙriº.¶+H~§vØb±Ê{Gz·¢±©ÞÅ©©êºÈ§Ø^´Zè+kxºw-í¢ÇßÙÞµº(´e «m®&îµê'jw±Ëb(zºç-ßÖ(¹Æ§j[(±ëgzÖè¢Ñ 6¶æíg¨~Ø^r©º×«¡¸ÞrÓëöx7ªÞéܶ*'´Zè+kx½ø¢W·ÙÙeß4%ZZlÌúèÀ°º'HÀ°{@°º'ú⽫^JæÅ¢¹¡§xÓCj¢j@°°8¦ëojP,.à)¬¶± 0,JÚââ >4Ñ:5ç@°zËkB Not understanding LDAP is probably my biggest fault (because I'm sure I could have fumbled across a mistake that worked by now), I'm still unsure if this is even a route I should be taking, I don't know if the end-user has to be set up on a network, which after reading the parameters, I'm starting to think I may be barking up the wrong tree all together. So if anyone can help with the translation, or knows of an easier or a more efficient way, I'm open to suggestions.... Thanks. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
/dev/null Posted November 19, 2006 Share Posted November 19, 2006 So if anyone can help with the translation, or knows of an easier or a more efficient way, I'm open to suggestions.... Thanks.what are you trying to do? Based on the code you've provided I'm not quite sure ...CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Valuater Posted November 19, 2006 Share Posted November 19, 2006 You know that I know that You know that I know that You know that I know that You know that I know that You know that I know that You know that I know that ... this is out of my leaguebut gafrost made one, its in Autoit Wrappers ( where i put all your stuff too )http://www.autoitscript.com/forum/index.ph...st&p=199602hope it helps8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 19, 2006 Author Moderators Share Posted November 19, 2006 what are you trying to do? Based on the code you've provided I'm not quite sure ...CheersKurtDuring the registration process or the starting of the application if it's already been registered. It checks for the UUID of the computer it is on. It then writes that UUID (encrypted) and compares every start up along with the registration authenticating.On some computers, the UUID is returned NULL or Empty. So then I go for the next best thing, the MAC.Now the above worked fine for verifying that it was only used on the computer it was originally registered too until yesterday.I received 2 Null strings and No MAC.I need a way to set a GUID to the UUID location if it is NULL or Empty, so that I don't get a failed attempt from an Empty/Null UUID and a Empty MAC address. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 19, 2006 Author Moderators Share Posted November 19, 2006 (edited) You know that I know that You know that I know that You know that I know that You know that I know that You know that I know that You know that I know that ... this is out of my leaguebut gafrost made one, its in Autoit Wrappers ( where i put all your stuff too )http://www.autoitscript.com/forum/index.ph...st&p=199602hope it helps8)That generates the GUID, I need to set it, I can't have it generate at every startup, it should only be once. Edit:Better clarification Edited November 19, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
/dev/null Posted November 19, 2006 Share Posted November 19, 2006 (edited) I need a way to set a GUID to the UUID location if it is NULL or Empty, so that I don't get a failed attempt from an Empty/Null UUID and a Empty MAC address.Ah, O.K. But then you will need something different than LDAP, as an LDAP service is only available if there is a Domain (and a domain controller). There is no LDAP service on a single WinXP box.... Maybe google has an answer. Let's see .... I'll be back ( I always wanted to say that )EDIT: to be totally sure. You want a secure method to identify a computer, so your installation/start-up routine can check if your software has already been registered?CheersKurt Edited November 19, 2006 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 19, 2006 Author Moderators Share Posted November 19, 2006 Ah, O.K. But then you will need something different than LDAP, as an LDAP service is only available if there is a Domain (and a domain controller). There is no LDAP service on a single WinXP box.... Maybe google has an answer. Let's see .... I'll be back ( I always wanted to say that )I'll call you Arnold from now on rather than Kurt EDIT: to be totally sure. You want a secure method to identify a computer, so your installation/start-up routine can check if your software has already been registered?CheersKurtNot just already "registered" to, but also verify that is only on the same computer it was "originally" registered to.Something that won't be the same if cloned like the UUID is not the same when cloned.Thanks for your time Arnold Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
/dev/null Posted November 19, 2006 Share Posted November 19, 2006 I'll call you Arnold from now on rather than Kurt Not just already "registered" to, but also verify that is only on the same computer it was "originally" registered to.Something that won't be the same if cloned like the UUID is not the same when cloned.Thanks for your time Arnold are you REALLY sure that a UUID is not the same when a system was cloned (with GHOST or Acronis)???CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 19, 2006 Author Moderators Share Posted November 19, 2006 (edited) are you REALLY sure that a UUID is not the same when a system was cloned (with GHOST or Acronis)???CheersKurtNope, I'm fairly sure it's created by the virtual environment itself.. I'm just trying to cover all bases (preventative maintenance).Edit:Ebonics. Edited November 19, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now