Sign in to follow this  
Followers 0
MattX

Regdelete

4 posts in this topic

OK, call me dumb but why on earth can't I get the regdelete to work ?

Why is this not working:

RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE", "TrendMicro")

The TrendMicro key is still there everytime I refresh the registry.

[ Rest of the code as follows if its of any importance ]

Dim $RC

$RC = Msgbox (4, "Officescan Delete Prog. Written By Matt . May 2004", "This will remove specific registry entries to allow a re-install of Officescan. Continue ?", 10)

If $RC = 7 Then

Exit

ElseIf $RC = 6 Then

RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE", "TrendMicro")

EndIf

Share this post


Link to post
Share on other sites



what does it return?

try something like

$del = RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE", "TrendMicro")
if $del = 2 then 
msgbox(0, "error", "registry key not deleted");or do something useful with this knowledge
elseif $del = 0 then
msgbox(0, "error", "registry key doesn't exist")
else
;do the rest of the code?

I'm finding more and more that it's good to check the return values when they're available...

PS, I'm not 100 certain of the quality of the above code, it's more to give you ideas...


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

OK, call me dumb but why on earth can't I get the regdelete to work ?

Why is this not working:

RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE", "TrendMicro")

The TrendMicro key is still there everytime I refresh the registry.

[ Rest of the code as follows if its of any importance ]

Dim $RC

  $RC = Msgbox (4, "Officescan Delete Prog. Written By Matt . May 2004", "This will remove specific registry entries to allow a re-install of Officescan. Continue ?", 10)

  If $RC = 7 Then

    Exit

  ElseIf $RC = 6 Then

    RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE", "TrendMicro")

  EndIf

do you want to delete the tree "HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro" with all its keywords etc ??

If thats the case then try :

RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro")


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

If thats the case then try :

RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro")

Thanks - just saved my bacon - worked .

I can now finish yet another bit of code !!

Share this post


Link to post
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
Sign in to follow this  
Followers 0