renaixsence 0 Posted June 4, 2005 I'm working on a script to ad a button to the IE-toolbar. In the registry I need to ad a key and that key needs to be unique ( GUID ). I found a program to create that key but I want to do it without using an external program. Is this possible ???? when only using AutoIt. Share this post Link to post Share on other sites
Valuater 129 Posted June 4, 2005 I believe you can do it with this......... Strait from help ; Write a single REG_SZ value RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE", "TestKey", "REG_SZ", "Hello this is a test") ; Write the REG_MULTI_SZ value of "line1" and "line2" RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE", "TestKey", "REG_MULTI_SZ", "line1" & @LF & "line2") Hope ie helps Share this post Link to post Share on other sites
renaixsence 0 Posted June 5, 2005 I believe you can do it with this.........Strait from help; Write a single REG_SZ valueRegWrite("HKEY_LOCAL_MACHINE\SOFTWARE", "TestKey", "REG_SZ", "Hello this is a test"); Write the REG_MULTI_SZ value of "line1" and "line2"RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE", "TestKey", "REG_MULTI_SZ", "line1" & @LF & "line2")Hope ie helps<{POST_SNAPBACK}>Sorry, but this is not my problem. Before I write to the registry I need to create a GUID ( this is a GUID : {A54CF7CE-93C2-4b15-8B2D-34F851ECE743} ). I could make up one myself but then there is a ( little ) chance that it is allready used by another program in the registry. The external program I have checks the registry first and then makes a new one but this needs to be done on the local computer where you run the script and that's why I want to trie to do this with AutoIt. Share this post Link to post Share on other sites
Valik 478 Posted June 5, 2005 Sorry, but this is not my problem. Before I write to the registry I need to create a GUID ( this is a GUID : {A54CF7CE-93C2-4b15-8B2D-34F851ECE743} ). I could make up one myself but then there is a ( little ) chance that it is allready used by another program in the registry. The external program I have checks the registry first and then makes a new one but this needs to be done on the local computer where you run the script and that's why I want to trie to do this with AutoIt.<{POST_SNAPBACK}>Sorry, but no, thats not how a GUID is created. I don't know the actual algorithm but I do recall reading that GUID's use time as one of the seeds so the only way to generate the same GUID twice is to literally set your clock back so that it can use the same time (Presumably, one of the other seeds will be different, though). GUID's are globally unique; if you create a GUID, no other PC on this planet should have that same GUID appear anywhere on it unless you put it there. There is no registry checking involved. Share this post Link to post Share on other sites
/dev/null 2 Posted June 5, 2005 Sorry, but this is not my problem. Before I write to the registry I need to create a GUID ( this is a GUID : {A54CF7CE-93C2-4b15-8B2D-34F851ECE743} ). I could make up one myself but then there is a ( little ) chance that it is allready used by another program inOLE32.dll provides two functions to create a GUID as a string. "CoCreateGuid" and "StringFromGUID2". You could call these with DllCall. Search this forum for DllCall and DllStruct to get an idea on how to call external function from an AutoIT script. Search google for some VBSCRIPT examples with those two functions an the way they are called.OR: simply use the UDF from this link ;-) UID, Universal IdentifierCheersKurt __________________________________________________________(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 * Share this post Link to post Share on other sites