I would like to know how to delete a "Deny rule" that makes imposible to modify a register key, using the command line.
Context:
In windows every file extension association resides in:
HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\
For instance the default app for .mp4 files is managed in:
HKCU:\Software\Microsoft\Win开发者_开发技巧dows\CurrentVersion\Explorer\FileExts\.mp4\UserChoice
The Userchoice key has a deny permission above all other permisions. The following picture shows what I mean:
I have tried with Powershell using set-acl
but due the same deny Deny rule I can't modify anything of that key.
Why all this? I was creating a script to define easily through command line the default app for an specific extension. The change in the registry is a must to make this works.
Have you tried non-Microsoft solutions? Give http://helgeklein.com/setacl/documentation/command-line-version-setacl-exe/ a go.
Are you running the script with elevated permissions (i.e. did you start Powershell with "Run as Administrator"?
精彩评论