|
|
| |

How do I delete a particular value for a key in the registry via Transact-SQL?
Answer:
You can use the xp_regdeletevalue undocumented extended stored procedure
to delete a particular value for a key in the registry via Transact-SQL.
This is the syntax of the xp_regdeletevalue:
EXECUTE xp_regdeletevalue [@rootkey=]'rootkey',
[@key=]'key',
[@value_name=]'value_name'
|
For example, to delete the value 'TestValue' for the key 'SOFTWARE\Test'
from 'HKEY_LOCAL_MACHINE', run:
EXEC master..xp_regdeletevalue
@rootkey='HKEY_LOCAL_MACHINE',
@key='SOFTWARE\Test',
@value_name='TestValue'
|
See this FAQ question:
How do I read from the registry via Transact-SQL?
See this article to get more useful undocumented extended stored procedures:
Useful undocumented extended stored procedures
|
|
|