RegKey Deletion!!

Can you delete the following Subkey from registry under HKEY_LOCAL_MACHINE
hive.??

\SYSTEM\ControlSet001\Enum\Root
<file:>

I tried to delete the subkey , it keep saying error in deleting the key.

I tried to delete by programmatically, still no success…

char* pChar = " \SYSTEM\ControlSet001\Enum\Root\LEGACY_XXDRIVER
<file:> ";
LONG lRetValue = RegDeleteKey(HKEY_LOCAL_MACHINE,pChar);
if (lRetValue == ERROR_SUCCESS)
AfxMessageBox(“Key Deleted Successfully”);
else
{

LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
0, // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL );
// Display the string.
AfxMessageBox(“ERROR: Error in deleting Key”);
// Free the buffer.
LocalFree( lpMsgBuf );
}

I am using WindowsNt 4.0 .
Thanks, Binay


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</file:></file:>

This key would normally have permissions preventing deletion. Use REGEDT32 (or
programmatically) to alter the permissions so that you have write/delete access.

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: Mishra, Binay [mailto:Binay_Mishra@G1.com]
Sent: Thursday, August 23, 2001 9:11 AM
To: NT Developers Interest List
Subject: [ntdev] RegKey Deletion!!

Can you delete the following Subkey from registry under HKEY_LOCAL_MACHINE
hive.??

\SYSTEM\ControlSet001\Enum\Root

I tried to delete the subkey , it keep saying error in deleting the key.

I tried to delete by programmatically, still no success…


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks for your note.!!
I dont see any option , about how to change permission from REGEDIT32.

-----Original Message-----
From: Paul Bunn [mailto:xxxxx@UltraBac.com]
Sent: Thursday, August 23, 2001 12:56 PM
To: NT Developers Interest List
Subject: [ntdev] RE: RegKey Deletion!!

This key would normally have permissions preventing deletion. Use REGEDT32
(or programmatically) to alter the permissions so that you have write/delete
access.

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com http:

-----Original Message-----
From: Mishra, Binay [mailto:Binay_Mishra@G1.com
mailto:binay_mishra]
Sent: Thursday, August 23, 2001 9:11 AM
To: NT Developers Interest List
Subject: [ntdev] RegKey Deletion!!

Can you delete the following Subkey from registry under HKEY_LOCAL_MACHINE
hive.??

\SYSTEM\ControlSet001\Enum\Root

I tried to delete the subkey , it keep saying error in deleting the key.

I tried to delete by programmatically, still no success…


You are currently subscribed to ntdev as: binay_mishra@g1.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</mailto:binay_mishra></http:>

Paul,

you wrote on Thursday, August 23, 2001, 18:56:24:

PB> This key would normally have permissions preventing deletion. Use REGEDT32 (or
PB> programmatically) to alter the permissions so that you have write/delete access.

In addition, RegDeleteKey() deletes only keys that have no subkeys in
NT/2K/XP.

Ralf.

/*======================== Foot shot for today =========================
HyperTalk:

Put the first bullet of the gun into foot left of leg of you.
Answer the result.
======================================================================*/


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Menu item: Security/Permissions. Do not use REGEDIT – must use REGEDT32.

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: Mishra, Binay [mailto:Binay_Mishra@G1.com]
Sent: Thursday, August 23, 2001 10:37 AM
To: NT Developers Interest List
Subject: [ntdev] RE: RegKey Deletion!!
Importance: High

Thanks for your note.!!
I dont see any option , about how to change permission from REGEDIT32.

-----Original Message-----
From: Paul Bunn [mailto:xxxxx@UltraBac.com]
Sent: Thursday, August 23, 2001 12:56 PM
To: NT Developers Interest List
Subject: [ntdev] RE: RegKey Deletion!!

This key would normally have permissions preventing deletion. Use REGEDT32 (or
programmatically) to alter the permissions so that you have write/delete access.

-----Original Message-----
From: Mishra, Binay [mailto:Binay_Mishra@G1.com]
Sent: Thursday, August 23, 2001 9:11 AM
To: NT Developers Interest List
Subject: [ntdev] RegKey Deletion!!

Can you delete the following Subkey from registry under HKEY_LOCAL_MACHINE
hive.??
\SYSTEM\ControlSet001\Enum\Root


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

RE: [ntdev] RegKey Deletion!!Are you using REGEDIT or REGEDT32? REGEDIT
does not have option to change permissions, REGEDT32 does. Also, if you are
going to delete it programmatically, you must first recursively delete all
subkeys and values first.

Greg
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Mishra, Binay
Sent: Thursday, August 23, 2001 12:37 PM
To: NT Developers Interest List
Subject: [ntdev] RE: RegKey Deletion!!
Importance: High

Thanks for your note.!!
I dont see any option , about how to change permission from REGEDIT32.

-----Original Message-----
From: Paul Bunn [mailto:xxxxx@UltraBac.com]
Sent: Thursday, August 23, 2001 12:56 PM
To: NT Developers Interest List
Subject: [ntdev] RE: RegKey Deletion!!

This key would normally have permissions preventing deletion. Use
REGEDT32 (or programmatically) to alter the permissions so that you have
write/delete access.

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: Mishra, Binay [mailto:Binay_Mishra@G1.com]
Sent: Thursday, August 23, 2001 9:11 AM
To: NT Developers Interest List
Subject: [ntdev] RegKey Deletion!!

Can you delete the following Subkey from registry under
HKEY_LOCAL_MACHINE hive.??

\SYSTEM\ControlSet001\Enum\Root

I tried to delete the subkey , it keep saying error in deleting the key.

I tried to delete by programmatically, still no success…


You are currently subscribed to ntdev as: binay_mishra@g1.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You are currently subscribed to ntdev as: xxxxx@pdq.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com