Jump to content

RegDelete No't Delete Registery Key Why?


Recommended Posts

  • Replies 43
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

You probably don't have access rights for modifying registry.

Try to log-on as Administrator and test if your script will work.

Hi,

on normal circumstances you have the right to write / delete keys in tree HKCU.

The example isn't reproducable, because the key never wouldn't be written like this beneath ...Microsoft\Windows.

1) Start regedit and create a key, eg. HKEY_CURRENT_USER\Software\MYTEST, REG_SZ Test with value Test

2) Code: RegDelete("HKCU\Software\MYTEST", "Test")

3) If you have 64 Bit OS you should use HKCU64

AND THE MOST IMPORTANT (see helpfile):

Deleting from the registry is potentially dangerous--please exercise caution

;-))

Stefan

Link to comment
Share on other sites

Hi.

No't User Me Admin.

Win Vista Ul x86.

No't Delete.

RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved", "{46FF608D-98A4-D566-772B-E7CDA74A0B9F}")

Hi,

try #RequireAdmin at the beginning of your script.

;-))

Stefan

Link to comment
Share on other sites

yes,can delete key.

Add But no't Delete.

#RequireAdmin
RegDelete("HKCUSoftwareMicrosoftWindowsCurrentVersionShell ExtensionsApproved", "{46FF608D-98A4-D566-772B-E7CDA74A0B9F}")

no't delete {46FF608D-98A4-D566-772B-E7CDA74A0B9F}

Edited by Jon
Removed suspected malware link.
Link to comment
Share on other sites

  • 4 months later...

According to helpfile

Function RegDelete

When running on 64-bit Windows if you want to delete a key or value specific to the 64-bit environment you have to suffix the HK... with 64 i.e. HKLM64.

Try this:

RegDelete("HKCU64\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved", "{46FF608D-98A4-D566-772B-E7CDA74A0B9F}")
;RegDelete("HKCU64\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved")
MsgBox(0,'Error Code', @error)

Edited by Zedna
Link to comment
Share on other sites

But Me Need Delete Approved no {46FF608D-98A4-D566-772B-E7CDA74A0B9F}.

Caution, If you delete Approved you will delete ALL inside this "directory"... {46FF608D-98A4-D566-772B-E7CDA74A0B9F} included.

RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved")

Regards,

sahsanu

Link to comment
Share on other sites

I'm pretty sure that "Software\Microsoft\Windows\CurrentVersion\Shell Extensions\" is security protected an you will have to set permissions on that key.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Not Delete Not Show Me Error Autoit.

Did you try HKCU and HKCU64?. Sorry but I never played with Windows 7 and don't have any Windows 7 installed to test the examples.

Test if you can read the registry key (if HKCU64 does not work try with HKCU):

#RequireAdmin
If IsAdmin() Then
   RegRead("HKCU64\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved","")
   MsgBox(0,"",@error & " & " & @extended)
Else
   MsgBox(16,"Error","You are not admin")
EndIf
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...