mbusse Posted August 16, 2004 Posted August 16, 2004 Hello, I am looking for someone to confirm I have used the right syntax in this example. I am having a problem with an endless loop. So, I am checking a registry value and saying if it does not equal the value of the variable testkey2 then install a patch. I look in the registry and it contains the information, yet my script does not pick it up. Is my syntax wrong? Regread, TestKey2, REG_SZ, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Internet Explorer,UpdateInf ifinstring, Testkey2, C:\\WINNT\\INF\\Q867801.inf, goto, COMPLETE Thanks.. Also, this only applies to windows 2000 machines, for XP it is windows instead of winnt. I have tried both and neither work..
Beastmaster Posted August 16, 2004 Posted August 16, 2004 Regread, TestKey2, REG_SZ, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Internet Explorer,UpdateInfifinstring, Testkey2, C:\\WINNT\\INF\\Q867801.inf, goto, COMPLETEI guess the path which is returned within the variable Testkey2 doesn't need to be checked as "double slashed".btw: instead of changing windows/winnt you can use the environment variable %windir%Please check if this works for you.Regread, TestKey2, REG_SZ, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Internet Explorer,UpdateInfMsgBox, 0, Test, %TestKey2%ifinstring, Testkey2, %windir%\INF\Q867801.inf, goto, COMPLETE
Beastmaster Posted August 16, 2004 Posted August 16, 2004 I guess the path which is returned within the variable Testkey2 doesn't need to be checked as "double slashed".Fit's for AHK With changing the escape character within my AHK script to become the historic AU2 "\" it was the same as Larry has tested successfully.
mbusse Posted August 16, 2004 Author Posted August 16, 2004 this worked for me... Regread, TestKey2, REG_SZ, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Internet Explorer,UpdateInf MsgBox, 0, Test, %TestKey2% ifinstring, Testkey2, %windir%\\INF\\Q867801.inf, goto, COMPLETE <{POST_SNAPBACK}>So, you are saying my syntax was correct? When running this code, it goes in a loop , I check the registy and the value is there, but it does not realize this. Hence I thought my syntax was wrong.
Recommended Posts