Sign in to follow this  
Followers 0
mbusse

Code Check

5 posts in this topic

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..

Share this post


Link to post
Share on other sites



Regread, TestKey2, REG_SZ, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Internet Explorer,UpdateInf

ifinstring, Testkey2, C:\\WINNT\\INF\\Q867801.inf, goto, COMPLETE

I 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,UpdateInf

MsgBox, 0, Test, %TestKey2%

ifinstring, Testkey2, %windir%\INF\Q867801.inf, goto, COMPLETE

Share this post


Link to post
Share on other sites

I guess the path which is returned within the variable Testkey2 doesn't need to be checked as "double slashed".

Fit's for AHK :ph34r:

With changing the escape character within my AHK script to become the historic AU2 "\" it was the same as Larry has tested successfully.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Please provide your complete code. Thx.

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0