Opened 12 years ago
Closed 11 years ago
#2623 closed Bug (Fixed)
RegDelete() returns 0 instead of 2 when unable to delete key
| Reported by: | Factfinder | Owned by: | Jon | 
|---|---|---|---|
| Milestone: | 3.3.13.11 | Component: | AutoIt | 
| Version: | 3.3.10.2 | Severity: | None | 
| Keywords: | Cc: | 
Description
After installing the latest AutoIt version (3.3.10.2) I noticed it. I'm not sure about the older versions.
I noticed it when I was not able to delete an AV leftover service that was still running.
I created a registry key, removed Full Access but left Read Access for all the groups:
$ret = RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\test"); subkey with only read access for evryone
MsgBox(0, "delte aatest", $ret & "," &  @error); $ret = 0 @error= 1
From the function description:
Success:         1.
Special:         0 if the key/value does not exist.
Failure:         2 if error deleting key/value and sets the @error flag to non-zero.
It means the return value says the key doesn't exist. 
In short instead of 2 it returns 0. 
Attachments (0)
Change History (2)
comment:1 Changed 12 years ago by anonymous
comment:2 Changed 11 years ago by Jon
- Milestone set to 3.3.13.11
 - Owner set to Jon
 - Resolution set to Fixed
 - Status changed from new to closed
 
Fixed by revision [10486] in version: 3.3.13.11
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
 - In-depth discussions should take place on the forum.
 
For more information see the full version of the ticket guidelines here.

Thank you.