Jump to content

Help my


Recommended Posts

I am trying to write a program to remove netbus 1.70

it is supposed to compare every program in the key HKEY_Local_Machine\Software\Windows\Currentversion\Run to to the netbus server program using

the dos command FC. and then delete the key that is is the one for netbus and then delete the program as found in the registry.it then will delete other keys assiated with netbus.I tried this but it does not work as it always returns 20

Here is the script i wrote to test my function

$EntryCount=RegCountEntries ("HKEY_CURRENT_USER\Software\TestKey")
MsgBox (4096,"",$EntryCount)
Func RegCountEntries ($RCE_Key)
    Local $RCE_Key
    Local $RCE_N
    Local $RCE_CheckForEntry
    Local $RCE_EntryCount

    For $RCE_N= 1 to 20
        $RCE_CheckForEntry=RegEnumVal ($RCE_Key, $RCE_N)
        If $RCE_CheckForEntry=-1 then 
            $RCE_EntryCount=$RCE_N - 1
            ExitLoop
        EndIf
        If $RCE_N=20 then
            $RCE_EntryCount=20
            ExitLoop
        EndIf


    Next
    Return $RCE_EntryCount
EndFunc

The Key "HKEY_CURRENT_USER\Software\TestKey"

contained 4 blank entries called 1,2,3,and 4

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

Take out the line: 'Local $RCE_Key'

When that's the parameter it's already declared, your just clearing the value.

I don't see anything else wrong except that spacing is really annoying to look at. Spaces are your friend :idiot:

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

Take out the line: 'Local $RCE_Key'

When that's the parameter it's already declared, your just clearing the value.

I don't see anything else wrong except that spacing is really annoying to look at. Spaces are your friend :D

<{POST_SNAPBACK}>

Thank You Wolvereness. :idiot: I am going to try what you said
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
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...