0
1
I am trying to delete the following registry key via CMD but am getting "ACCESS DENIED"
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Pastel
- The above registry cannot be deleted manually as it gives an error
To deal with Permissions I've used PSExec and ran the following command as administrator, which brings up Registry Editor with supposedly full Permissions but I still cannot delete the registry key
psexec -i -d -s c:\windows\regedit.exe
I am running Windows 7. How can I grant permission and delete the registry key from CMD using script or at Windows start-up?
Edit: Above registry and its sub-folders has following permissions.
CREATOR OWNER: Special Permissions ----> If I Disable Inheritance and change permission to grant full access as soon I hit OK and right click>permission the Full access resets to special permissions.
SYSTEM: Full Control, Read Administrators: Full Control, Read Users: Full Control, Read
Edit#2:
I've used following script but still no success
REM ----------------------------------------------------------------
cd /d %~dp0
@ECHO OFF
Title Replacing permissions on HKEY_CLASSES_ROOT\DesktopBackground\Shell\Display
setacl.exe -on "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Pastel" -ot reg -actn setowner -ownr "n:Administrators"
Pause
REG DELETE HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Pastel /f
Pause
Exit
REM ----------------------------------------------------------------
If you open that key in regedt32.exe and right click permissions, what do you see? – DavidPostill – 2015-07-03T18:06:33.130
What are you actually trying to accomplish? This key does not exist on regular systems. In fact, this question is the only reference to it. – Daniel B – 2015-07-03T18:22:15.093
@DavidPostill I've updated question – LEO – 2015-07-04T06:58:28.050
@DanielB No that's not reference and this key doesn't exist on regular system, its left overs from a software after uninstalling. I want to remove these keys as they are causing trouble when I re-install that software. – LEO – 2015-07-04T07:03:36.613
@leo, I would try logging in using the default Administrator account (not as a user who is a member of the Administrators Group) and try from that account. The default Administrator has a few more privileges than created accounts in the Administrators Group. – DavidPostill – 2015-07-04T07:41:12.927
@DavidPostill I have same issue with PC running window 8 what should I do with that, by the it didn't worked using default Admin account on Win 7 – LEO – 2015-07-04T14:56:49.453
@leo. No idea, other that using one of the many progrmas that clean up bad installs, for example http://www.iobit.com/en/advanceduninstaller.php or http://www.revouninstaller.com/revo_uninstaller_free_download.html
– DavidPostill – 2015-07-04T14:59:11.820it can be done via regedit by changing permissions: first change the ownership to your current account, then add permissions for it, but no idea how to do it via command line. Per your command line, seems that only owner is changed but permission is not added. – Chris.C – 2015-07-04T18:53:02.460
@Chris.C how to change ownership and permissions plz tell me what are the steps. – LEO – 2015-07-05T11:20:20.050