a bug? in registering GAC

Nov 24, 2008 at 7:04 AM
Edited Nov 24, 2008 at 10:44 AM
Hi,Chris

sometimes the Config.register(..) failed.
report error "You might not have administrative credentials to perform this task  GAC"
I'm logging in using administrator.
       
Coordinator
Nov 24, 2008 at 11:45 AM
last time you said that you have a fix for this? 

but it should be clear that you always need admin permissions for this task... so make sure your app is started as admin, then all things should go fine...

regards
chris
Nov 26, 2008 at 1:21 AM
Edited Nov 26, 2008 at 1:37 AM
yeah.
I delete my last post, because it's not right.

and now I got another way to fix it.

If I create a process loading "cmd.exe", with args like" runas /user:administrator  gac.exe /il...."+your original command.
everything is fine. but there is another problem, I can not redirect the standoutput of gac.exe, so the output information can not show in debuging output.Even if I use "gac.exe > file.txt", no output is recorded in the file.have you got any clue to fix this?

and if anyone here meet the same problem with me. there are several ways you can try.
1.go find your IDE(VS)'s  "devenv.exe" file, open it's 'properties', 'compatibility', select ‘Run this program as an administrator’ . if you are in XP, you might not have this setting, I don't have neither :(
2.using "cals"command to change privilieges. 
3.my solution:)

reason about why we log as administrator ,but ".exe" is not running with administrator priviliege, can be found if you google...MSDN also have some explaination.

Thank you Chris, for making such a wonderful tool :)

Coordinator
Nov 26, 2008 at 12:35 PM
As I said earlier, admin privileges are required... if you don't start VS with admin privileges it is really resonable and very important that a global GAC registration will fail...
Nov 27, 2008 at 12:43 AM
yes~ administrator privileges is the key... I didn't check if my VS is running with what kind of privileges, waste my a lot of times.
someone have the same situation should check that first.