Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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.

e.g.

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

 
discard

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.