long ret;
LPCTSTR SubKey=_T("S-1-5-21-1644491937-1214440339-1801674531-500\\Software\\应用程序向导生成的本地应用程序\\DetectSystem\\Workspace\\DockablePaneAdapter-0") ;
HKEY hSubKey;
ret = RegOpenKeyEx(HKEY_USERS,SubKey,0,KEY_ALL_ACCESS,&hSubKey);
if(ret!=ERROR_SUCCESS)
{
RegCloseKey(hSubKey);
return;
}
LPCTSTR ssubkey = _T("BarName"); //该键值为你的键值名而非键值
ret = RegDeleteValue(hSubKey,ssubkey);
if (ret == ERROR_SUCCESS)
{
//Do what you want
}
RegCloseKey(hSubKey);
删除注册表键值
最新推荐文章于 2023-03-30 00:54:06 发布