Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As part of a deployment process I am trying to GAC a series of files. The actual build process occurs on a build server, and I am trying to use psexec to GAC the files on whichever machine has requested the build.

The current line I am trying to execute is:

C:\PsTools>psexec.exe \COMPUTER -u USER -p PASS gacutil.exe -i Assembly.dll -f

The error that I am getting back is:

Failure adding assembly to the cache: The system cannot find the file specified.

So apparently the dll reference is on the remote box, and unfortunately the dll is sitting on the build box. Is there any way to just do this with psexec somehow, or do I need to copy it to some temporary location on the \\COMPUTER? I know there are commands to copy the executable as part of the psexec process, but I can't seem to find anything similar for supporting files.

share|improve this question
up vote 2 down vote accepted

I say you would need to copy this file to the server first, or alternatively you could share the file from the build server and reference that in your psexec command.


psexec.exe \COMPUTER -u USER -p PASS gacutil.exe -i \buildbox\share\Assembly.dll -f

the only thing to remember is that the remote process (running on your target computer) runs under the context of the system account and you will need to accomidate for this with your network shares

hope that helps

share|improve this answer
I wondered if that might be the case. Thanks for the advice commandbreak. – Andrew Dunaway Mar 18 '10 at 17:26
did that work? any luck? – commandbreak Mar 19 '10 at 0:12
Hey CommandBreak, sorry for disappearing. Yeah, I ended up using the network share and that seems to work great. Thanks for the help. – Andrew Dunaway Mar 27 '10 at 23:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.