Access Denied Error when deploying dll to GAC

After doing some looking around, I resolved to focus on the policy highlighted above: User Account Control: run all administrators in Admin Approval Mode. It was Enabled on their server.

First, About “Admin Approval Mode”. Taken literally, Admin Approval Mode means that any action that should only be achievable by an administrator must go through UAC’s “Admin Approval” (the secure screen that presents the approval). By default (as listed above), actions that require Administrator rights must go through the “Admin Approval Mode” process… even if the person doing the action is part of the Administrators group. Setting this to “Disabled” effectively means that Admin Approval Mode is no longer required for members of the local Administrators group… effectively disabling UAC entirely for those users.
Steps to install assemblies in C:\Windows\assembly (GAC) on Windows 7 and Windows 2008 R2
Open Local Security Policy, Security Settings > Local Policies > Security Options and change the key “User Account Control: Run all administrators in Admin Approval Mode” from Enabled to Disabled
Open Control Panel, System and Security > Change User Account Control settings, drag the control to bottom, Never Notify
Restart the machine so that the registry settings are loaded with the new settings.
When the machine comes up, login and open a command prompt by right-clicking and “Run As Administrator”
Start explorer from the command prompt
Start another window by right-clicking in the explorer window you just opened and select “Open in new window”
Final step is to drag the assemblies (.dll) from source to C:\windows\assembly and drop them there.
cleanup by Open Local Security Policy, Security Settings > Local Policies > Security Options and change the key “User Account Control: Run all administrators in Admin Approval Mode” from Disabled to Enabled
Open Control Panel, System and Security > Change User Account Control settings, drag the control up to the same level as your setting was prior to this excercise

Leave a Reply

Your email address will not be published. Required fields are marked *

Bitnami