GAC and Access Denied

by Marre 9. December 2008 21:22

Have you ever got that annoying "Access Denied" when using Gacutils  to ad an dll to GAC? Well....I have. The reason to my problem was that (as the error says) I had no access to add dll:s into it. I am administrator on my machine, so I think it´s a little bit confusing.

This command did it for me:

CACLS c:\WINDOWS\assembly /e /t /p [DOMAIN|MACHINENAME]\useraccount:F

CACLS is an application that can display or modify the Access Control List (ACLs) of files.

So, what I´m telling my OS (Windows XP) is that my user (machinename\useraccount) should have full rights (the :F after my user) to the WINDOWS\assembly (GAC) folder. /e tells CACLS that I want to edit ACL instead of replacing it. /t tells it that those changes should be applied to this folder and it´s subfolders. /p tells the application that my users access rights should be replaced. 

For more info, type CACLS /? in CMD.

FYI: In Vista CACLS is deprecated. Use Icacls instead.

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Other

Powered by BlogEngine.NET 1.4.5.0
Theme by Supremelink Development

Martin Andersson

I´m currently working as senior consultant for Capgemini Norway AS.

Curriculum vitae

I use this blog when I find something useful that I want to be able to get hold of wherever I need. But who knows...Maybe someone else will find it useful as well.


About

Supremelink is the name of where I collect my spare time projects. The idea is to learn more about new techniques and areas that I´m not usually is working with or that can be nice to know before future projects at work.

To see the benefits with new technologies and to achieve as much knowledge about those areas, I usually have a goal/project to work with.

This site run´s on BlogEngine.NET. It´s a full featured blog that is using XML as data source. No database is required.

Supreme Software

When I find software that I like and of whitch I can see the benefits to use, I write about it under the category "Supreme Software".

Beware of the soon coming updates in this category!

Tag cloud