Jump to content

need some help


Recommended Posts

I have this Script and it dosnt work :whistle:

$var = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\", "dir")

if $var "9944946" then

MsgBox(4096, "Program files are in:", "all OK")

EndIf

HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\", "dir" is 9944946-657545644-654-6545444-44444

How to search only if $var contains this 9944946 and give ok when its found ?

Edited by TomCat
Link to comment
Share on other sites

now its a little bit more complicate.

$var = RegRead("HKEY_CURRENT_USER\Software\myfostware", "InstallKey")
$file = FileOpen("serials.txt", 0)
If StringInStr($var, $file) Then
MsgBox(4096, "Program files are in:", "ok")
EndIf

serials.txt which is normaly hosted on an webserver looks like this:

f323rfsdf

34453cd4

fsdf98345

fdsfsdfsd2

5453ddcxc

The installkey in the registry looks like f323rfsdf-342342-234234sdd3-234234 or 34453cd4-er344553-cxvg344-dfgdfg

now i will check if the beginning of the Regkey is the same than some number in the serials.txt

I tryed it with the script above but it dosnt work

It works only when one part of en Serial is in the serial.txt like f323rfsdf

but if there are more then one like

f323rfsdf

34453cd4

fsdf98345

fdsfsdfsd2

5453ddcxc

i ever get ok also when the Serial in registry is wrong :P

Can somebody help me plz :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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