Jump to content
Sign in to follow this  
AHRIMANSEFID

RegDelete No't Delete Registery Key Why?

Recommended Posts

AHRIMANSEFID

Hi All.

No't Delete key reg Why?

example :

RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Windows\", "{46FF608D-98A4-D566-772B-E7CDA74A0B9F}")

Share this post


Link to post
Share on other sites
99ojo

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

Share this post


Link to post
Share on other sites
AHRIMANSEFID

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}")

post-8907-12580951209899_thumb.jpg

Edited by AHRIMANSEFID

Share this post


Link to post
Share on other sites
99ojo

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

Share this post


Link to post
Share on other sites
AHRIMANSEFID

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.

Share this post


Link to post
Share on other sites
Authenticity

Try this, you're trying to delete sub key not a value:

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

Backup first, just in case.

Edited by Authenticity

Share this post


Link to post
Share on other sites
AHRIMANSEFID

Hi.

I,m Back Sorry.

Me need Code For Delete Address Plz Help Thanks.

Win7 x86+64

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved

Share this post


Link to post
Share on other sites
Zedna

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

Share this post


Link to post
Share on other sites
AHRIMANSEFID

Thanks Dear.

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

Thanks.

Share this post


Link to post
Share on other sites
sahsanu

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

Share this post


Link to post
Share on other sites
AHRIMANSEFID

Thanks But Not Delete.

Send Error Me :

Posted Image

Posted Image

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved

Edited by AHRIMANSEFID

Share this post


Link to post
Share on other sites
GEOSoft

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!"

Share this post


Link to post
Share on other sites
AHRIMANSEFID

Ok Plz Add example

Share this post


Link to post
Share on other sites
sahsanu

Let's see if you are admin, try this:

#RequireAdmin
If IsAdmin() Then
   RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved")
Else
   MsgBox(16,"Error","You are not admin")
EndIf

Edit: If you run Windows 7 64 bits change HKCU by HKCU64 in above RegDelete function.

Edited by sahsanu

Share this post


Link to post
Share on other sites
AHRIMANSEFID

Not Delete Not Show Me Error Autoit.

:):);):(

Share this post


Link to post
Share on other sites
sahsanu

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

Share this post


Link to post
Share on other sites
AHRIMANSEFID

Not delete.

me test new win 7 x86.

Autoit Send Code :

-1 & 2

Posted Image

Edited by AHRIMANSEFID

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.