I need to add a new registry key to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRunTime\AllowedCOMCLSIDs.
I tried running a following bat script:
@echo off
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRuntime\AllowedCOMCLSIDs\NewKey" /f /ve
PAUSE
What I got in return was an access denied message, tried doing the same by launching a cmd.exe as an administrator but got the same information. I only have one account on this computer and it has the admin rights.
I also tried running this script to see if it can add that key to a different directory under HKEY_LOCAL_MACHINE and so I ran this script:
@echo off
reg add HKEY_CURRENT_USER\Software\NewKey /f /ve
PAUSE
And that script was completed successfully.
Any idea how can I make the first one run properly as well? I've searched through multiple questions, threads and video tutorials showing modifications of users' groups properties but it doesn't really apply in this case, nothing changes since I already have all the rights assigned.
I'd be grateful for your help.
Edit: Ok, thanks everyone for your comments, I didn't have a clue that you can change the permissions for keys as well. Had to change the owner from SYSTEM to my account and then grant full permissions for those accounts and now the .bat script completes successfully.
Additional question - is it possible to change the owner of a given key file and grant the required permissions all in a single .bat file?
administrators
,users
oreveryone
with write access. Anti-virus software may also produce results like this.