Jump to content

Unable to delete registry value


Recommended Posts

I have a registry value in which the name is having \ and when I am trying to delete the registry,it is failing because of \.

The registry is given below.

 

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\{2D46B6DC-2207-486B-B523-A557E6D54B47}]
"Version"="9,0,8112,16421"
"Locale"="*"
"C:\\ProgramData\\Symantec\\Symantec Endpoint Protection\\"="C:\\ProgramData\\Symantec\\Symantec Endpoint Protection\\"

Can you please suggest how to delete the last value.

Link to comment
Share on other sites

Hi.

Welcome to the forum!

Autoit does *NOT* "escape" the BACKSLASHES. So you will need to make the double BACKSLASHES single BACKSLASHES.

 

Please lookup in the help file:

RegRead()
RegWrite()
RegDelete()

 

and possibly ...

#RequireAdmin

... in case you also need to handle keys / values in HKLM

 

$key="HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Components\{2D46B6DC-2207-486B-B523-A557E6D54B47}"
$val="C:\ProgramData\Symantec\Symantec Endpoint Protection\"

$Current=RegRead($key,$val)
MsgBox(0,"Result","KeyName: " & $key & @CRLF & _
"ValueName: " & $val & @CRLF & _
"ValueContent: " & $Current & @CRLF & _
"ErrorCode: " & @error)

 

 

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

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

×
×
  • Create New...