Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...