Saytun Posted January 22, 2005 Share Posted January 22, 2005 In the script I am making, I need it to check the registry for a value. If it is there, it would go on with the rest of the program. If it isn't, then it would use RegWrite to put the registry value there, then go on. However, I am having trouble doing this >< Normally, I'd do something like: $reg = RegRead ( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "" ) If $reg =/= "C:\Program Files\AATOOL\AATool.exe" Then RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "", "REG_SZ", "C:\Program Files\AATOOL\AATool.exe"") But there is no "=/=" or any other "does not equal" operator in AutoIt (at least that I am aware of. So I tried: If $reg NOT = "C:\Program Files\AATOOL\AATool.exe" Then But that doesn't work properly So I guess my question is: How would I properly use NOT in this case? Yes, I've read the manual and looked through the examples, and nothing Link to comment Share on other sites More sharing options...
CyberSlug Posted January 22, 2005 Share Posted January 22, 2005 If $reg <> "C:\Program Files\AATOOL\AATool.exe" Then .... If Not ($reg = "C:\Program Files\AATOOL\AATool.exe") Then Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Saytun Posted January 22, 2005 Author Share Posted January 22, 2005 If $reg <> "C:\Program Files\AATOOL\AATool.exe" Then....If Not ($reg = "C:\Program Files\AATOOL\AATool.exe") Then<{POST_SNAPBACK}>Agh, the "<>" operator must have slipped past me.Thanks for the help, I need to read more carefully next time =( 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