MattX Posted May 12, 2004 Posted May 12, 2004 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
emmanuel Posted May 12, 2004 Posted May 12, 2004 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)
Developers Jos Posted May 12, 2004 Developers Posted May 12, 2004 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") EndIfdo 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") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
MattX Posted May 18, 2004 Author Posted May 18, 2004 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 !!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now