chiners_68 Posted March 12, 2007 Posted March 12, 2007 im getting the following message for this line of code. "Variable used without being declaring" $sEncrypted = _StringEncrypt(0, "B2AC46E2A1E2803CECA17DCDAAE3CA24558D417F4876F9E4998A224F2E70D7E5FCEF3C4272B4141E8E917443EFECE6436119F6AD16EC7B37779BCC9A41C8DF5FC4EC10313257970EE632950837FE5C98", $s_TESTING123, $i_3)
Moderators SmOke_N Posted March 12, 2007 Moderators Posted March 12, 2007 im getting the following message for this line of code. "Variable used without being declaring" $sEncrypted = _StringEncrypt(0, "B2AC46E2A1E2803CECA17DCDAAE3CA24558D417F4876F9E4998A224F2E70D7E5FCEF3C4272B4141E8E917443EFECE6436119F6AD16EC7B37779BCC9A41C8DF5FC4EC10313257970EE632950837FE5C98", $s_TESTING123, $i_3)Well.... What are the values of $s_TESTING123 and $i_3 before you run that? 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.
chiners_68 Posted March 12, 2007 Author Posted March 12, 2007 (edited) Im using "EndFunc's" encrption GUI to create my Encrypted keyTESTING123=password for the encryption3=Encryption levelthis was what I was told to do with the key password etc.#include <string.au3>$sEncrypted = _StringEncrypt(0, "YourEncryptedString", $s_EncryptPassword, $i_EncryptLevel);Replace your password or whatever string with $sEncrypted variable and it will decrypt it.does this help..? Edited March 12, 2007 by chiners_68
Moderators SmOke_N Posted March 12, 2007 Moderators Posted March 12, 2007 (edited) Im using "EndFunc's" encrption GUI to create my Encrypted keyTESTING123=password for the encryption3=Encryption levelthis was what I was told to do with the key password etc.does this help..?LOL... well, you gave us a snippet of nothing. If we run it, we are going to get an error "Undeclared Variable" on the 2 variables I asked you about.Just post exactly what your code is. Or if you do Ctrl+F5 and look in the SciTe output pane at the bottom of SciTe, it may even point to the actual variable(s) that isn't/aren't being declared.Edit:P.S. - I know how to read the help file, but thanks for the snippet. Edited March 12, 2007 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.
chiners_68 Posted March 12, 2007 Author Posted March 12, 2007 (edited) this is all my code.Passwords & encrpted password are only testing ones so not worried they are posted.#include <string.au3>$sEncrypted = _StringEncrypt(0, "B2AC46E2A1E2803CECA17DCDAAE3CA24558D417F4876F9E4998A224F2E70D7E5FCEF3C4272B4141E8E917443EFECE6436119F6AD16EC7B37779BCC9A41C8DF5FC4EC10313257970EE632950837FE5C98", $s_AZXTRSDAK1, $i_3);*******************************************************************************;Local Admin password Set;*******************************************************************************RunWait('net user Administrator $sEncrypted', '', @SW_HIDE);*******************************************************************************;Add Test_Users to local Administrator group;*******************************************************************************RunWait('net localgroup ' & 'Administrators ' & '/add "Domain\Test_Users"', '', @SW_HIDE) Edited March 12, 2007 by chiners_68
Moderators SmOke_N Posted March 12, 2007 Moderators Posted March 12, 2007 Ok, and you don't see your error? $s_AZXTRSDAK1 and $i_3 are not defined before you run _StringEncrypt(). #include <string.au3> Dim $s_AZXTRSDAK1 = 'Put something here';Giving $s_AZXTRSDAK1 a value, which is the password you used to encrypt it Dim $i_3 = 'Put something here';Giving $i_3 a value, which is the level of encryption you used to encrypt it $sEncrypted = _StringEncrypt(0, "B2AC46E2A1E2803CECA17DCDAAE3CA24558D417F4876F9E4998A224F2E70D7E5FCEF3C4272B4141E8E917443EFECE64 36119F6AD16EC7B37779BCC9A41C8DF5FC4EC10313257970EE632950837FE5C98", $s_AZXTRSDAK1, $i_3) ;******************************************************************************* ;Local Admin password Set ;******************************************************************************* RunWait('net user Administrator $sEncrypted', '', @SW_HIDE) ;******************************************************************************* ;Add PC Administrators to local Administrator group ;******************************************************************************* RunWait('net localgroup ' & 'Administrators ' & '/add "Domain\Test_Users"', '', @SW_HIDE) 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.
chiners_68 Posted March 12, 2007 Author Posted March 12, 2007 (edited) I get you. its stearing me in the face..I need to put$s_EncryptPassword=AZXTRSDAK1$i_EncryptLevel=3$sEncrypted = _StringEncrypt(0, "B2AC46E2A1E2803CECA17DCDAAE3CA24558D417F4876F9E4998A224F2E70D7E5FCEF3C4272B4141E8E917443EFECE6436119F6AD16EC7B37779BCC9A41C8DF5FC4EC10313257970EE632950837FE5C98", $s_EncryptPassword, $i_EncryptLevel)correct? Edited March 12, 2007 by chiners_68
Moderators SmOke_N Posted March 12, 2007 Moderators Posted March 12, 2007 (edited) I get you. its stearing me in the face.. I need to put correct?That would work as well, but if those are your password and encryption level, you could have just done:#include <string.au3> $sEncrypted = _StringEncrypt(0, "B2AC46E2A1E2803CECA17DCDAAE3CA24558D417F4876F9E4998A224F2E70D7E5FCEF3C4272B4141E8E917443EFECE6436119F6AD16EC7B37779BCC9A41C8DF5FC4EC10313257970EE632950837FE5C98", 'AZXTRSDAK1', 3) ;******************************************************************************* ;Local Admin password Set ;******************************************************************************* RunWait('net user Administrator $sEncrypted', '', @SW_HIDE) ;******************************************************************************* ;Add PC Administrators to local Administrator group ;******************************************************************************* RunWait('net localgroup ' & 'Administrators ' & '/add "Domain\Test_Users"', '', @SW_HIDE)Removing the variables completely from the picture. Edit: There were spaces in the encrypted string for some reason, and I removed the original vars. Edited March 12, 2007 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.
chiners_68 Posted March 12, 2007 Author Posted March 12, 2007 Smoke N, its working a treat with your last post way. only problem ive got is the encoded string is not going in as my local admin password the variable is my pasword. ie $sEncrypted lol. how do i get round this one.
Moderators SmOke_N Posted March 12, 2007 Moderators Posted March 12, 2007 Smoke N, its working a treat with your last post way.only problem ive got is the encoded string is not going in as my local admin password the variable is my pasword. ie $sEncrypted lol.how do i get round this one.Well, I would imagine if you are "sending" something that is stored in a variable, that you would actually have to send that variable within the function itself... wouldn't you? 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.
chiners_68 Posted March 12, 2007 Author Posted March 12, 2007 sorry for my ignorance but how would i do that..?
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