delete registry key values
-
Hi all, I need to delete registry key values in VC++. I want to delete the values of :: HKLM->SYSTEM->MountedDevices Please suggest me by providing the code hints. Thanks.
-
Hi all, I need to delete registry key values in VC++. I want to delete the values of :: HKLM->SYSTEM->MountedDevices Please suggest me by providing the code hints. Thanks.
Try CReg class within ATL. It offers you so many handy functions. :rose:
-
Hi all, I need to delete registry key values in VC++. I want to delete the values of :: HKLM->SYSTEM->MountedDevices Please suggest me by providing the code hints. Thanks.
hello this may help you! Try it! To delete the value and the key it self ::RegDeleteKey((HKEY)hKey,(LPCWSTR)szKey); here HKEY is HKLM szKey is resst of the path i.e SYSTEM->MountedDevices to delete value of key open the path OpenKey (LPCTSTR hKey, LPCTSTR szKey) here HKEY is HKLM szKey is resst of the path i.e SYSTEM->MountedDevices then RegDeleteValue(mhKey,(LPCWSTR)lpValueName) i hope this will work
-
Hi all, I need to delete registry key values in VC++. I want to delete the values of :: HKLM->SYSTEM->MountedDevices Please suggest me by providing the code hints. Thanks.
-
hello this may help you! Try it! To delete the value and the key it self ::RegDeleteKey((HKEY)hKey,(LPCWSTR)szKey); here HKEY is HKLM szKey is resst of the path i.e SYSTEM->MountedDevices to delete value of key open the path OpenKey (LPCTSTR hKey, LPCTSTR szKey) here HKEY is HKLM szKey is resst of the path i.e SYSTEM->MountedDevices then RegDeleteValue(mhKey,(LPCWSTR)lpValueName) i hope this will work
Thanks for replying, I need to delete all values of MountedDevices key. So To delete them one by one I need to put it in to a loop, so how can I know the no of values that are there. RegDeleteValue(mhKey,(LPCWSTR)lpValueName) in this function lpValueName I need to pass the value name one by one. But I want to delete all values so that it will take the next value itself. Thanks.
-
You may use RegDeleteValue function!.
RegDeleteValue(hOpenKey, // handle to open registry key
sValueName); // string containing value name to deleteRegards, Rane
Thanks for replying, I need to delete all values of MountedDevices key. So To delete them one by one I need to put it in to a loop, so how can I know the no of values that are there. RegDeleteValue(mhKey,(LPCWSTR)lpValueName) in this function lpValueName I need to pass the value name one by one. But I want to delete all values so that it will take the next value itself. Thanks.
-
Hi all, I need to delete registry key values in VC++. I want to delete the values of :: HKLM->SYSTEM->MountedDevices Please suggest me by providing the code hints. Thanks.
-
Thanks for replying, I need to delete all values of MountedDevices key. So To delete them one by one I need to put it in to a loop, so how can I know the no of values that are there. RegDeleteValue(mhKey,(LPCWSTR)lpValueName) in this function lpValueName I need to pass the value name one by one. But I want to delete all values so that it will take the next value itself. Thanks.
-
Thanks for replying, I need to delete all values of MountedDevices key. So To delete them one by one I need to put it in to a loop, so how can I know the no of values that are there. RegDeleteValue(mhKey,(LPCWSTR)lpValueName) in this function lpValueName I need to pass the value name one by one. But I want to delete all values so that it will take the next value itself. Thanks.
Madan Chauhan wrote:
I need to delete all values of MountedDevices key.
Have you considered
RegDeleteKey()
?Madan Chauhan wrote:
So To delete them one by one I need to put it in to a loop, so how can I know the no of values that are there.
Did you search MSDN? Look for
RegEnumValue()
."Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch