Failure adding assembly to the cache Windows XP SP3 - windows

i am trying to add an assembly to the GAC but the error indicates that "Failure adding assembly to the cache: Administrator permissions are needed to use the selected options. Use an administrator ommand prompt to complete these tasks."
I am using Windows XP SP3 and user account type is Administrator. Please refer to the image below.
TIA
http://i.stack.imgur.com/TZXpc.png

You are administrator on your machine but you don't run the visual studio command prompt (or cmd.exe) as an admin ...

I was able to solve my problem by additional commands via command prompt
C:\WINDOWS\system32>runas /user:computerName\administrator cmd

Related

What is the privilege level for post install run of msi using the EnableLaunchApplication.js script in Visual Studio?

Using Visual Studio Installer Project I can launch a post install option using the script given here:
Run exe after msi installation?
The question is does the launched program run in elevated privileged mode or revert to the unprivileged user mode?
I have successfully used the script and the program launches fine but I am unsure if it is running as a normal user.
To add the script I add this under Deployment Project Properties
PostBuildEvent: cscript.exe "$(ProjectDir)EnableLaunchApplication.js" "$(BuiltOuputPath)"
It launches fine. I just don't know how to tell what user is running it (admin or standard)

CMake on Windows requires Administrator privileges

ALL,
I installed CMake on my Windows 7 laptop, but when trying to run and generate the solution files for MSVC 2010, I found it requires the "Administrator" privileges.
Why? Is there a way to run as a normal user?
Thank you.

Project : error PRJ0050: Failed to register output

When I use Visual Studio 2008 on my XP, everything is fine. But when I use the same on my Vista, I always get this error message when compiling my Visual C++ project. How to fix this?
1>Project : error PRJ0050: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions.
Try launching visual studio with "Run as administrator" options. (Right-click->Run as administrator)
If that doesn't work, run dependency walker (depends.exe) on your DLL to see if anything is missing and try registering from an elevated command prompt using:
regsvr32 mydll.dll
regsvr32.exe should give more information about the failure.
I came across the same issue. Lines of investigation included User account controls, Disable Registration and missing Dependencies.
My issue was resolved when looking into output registration. Go to: Properties-> Linker -> General -> Register Output. Set this to No. You will need to do this for debug and release configurations.
This fixed my problem.

64 bit VS2008 Post Build Event Command Line

I'm trying to use the post build command line to get my class library in the GAC.
It is:
"%programfiles%\Microsoft SDKs\Windows\v6.0A\Bin\x64\gacutil.exe" -if $(TargetPath)
I do not see any errors, but my DLL is not getting into the GAC.
However, I can run this from a DOS prompt and it works.
Anything special I need to do to make this command work in VS like this?
The answer is that on a 64 bit system, %programfiles% needs to be replaced with
%ProgramW6432% or %ProgramFiles(x86)%
Thanks for all of the help.
Are you running under Vista, Win7 or Win 2008 and UAC is making Visual Studio run in a non-admin context ? And you are launching the command prompt with admin privileges ?
You might need double quotes around the target: "$(TargetPath)"

spawning cmd.exe error in vs2008

I have created a simple vc++ console application and try to print "Hello World". I am using Windows Server 2003 machine.
When I try to build this project I got the error as Error: spawning cmd.exe
How do I fix this?
Check if cmd.exe is in <Path> environment variable?
I just did a small test by removing the %SystemRoot%\system32 from path environment variable and I got the same problem what you are facing.
Error 4 Error spawning
'cmd.exe'. Project SEH
If it is the path issue then try adding below to Projects and Solutions -> VC++ Directories:
$(SystemRoot)\System32
If you get error like this
Just open Tools –> Options –> Projects and Solutions –> VC++ Directories
and add these lines :
$(SystemRoot)\System32
$(SystemRoot)
$(SystemRoot)\System32\wbem
http://www.interact-sw.co.uk/iangblog/2005/09/12/cmdspawnerror
yes i hav found where the proble.
I unable to locate path of cmd.exe
so
go to visualstudio tools->options->projects and ->vc++ directories and specify ($SystemRoot)/system32 then it working fine.
Are you running on Vista? Could this be a case of needing to run Visual Studio as Administrator?
I believe cmd.exe is not runnable by a non administrative user by default on Windows Server 2003, so I would check its permissions. That of course assumes you are not running it as Administrator already.
Yep. (Another weird windows error)
Projects and Solutions -> VC++ Directories -> Executable Files
Add $(SystemRoot)\System32
it works
It was giving error for me because cmd.exe was not accessible with the current user.
What I did to solve this problem :
Close current Visual Studio.
Reopen Visual Studio by right clicking on visual studio and select 'Run as administrator'
Now run The project.
Why It works
To access cmd.exe application must have privilege to run this. It doesn't have permission to access this and hence it works next time when you tries to access it normally(without running application as Administrator)
Operating System
Windows 7

Resources