1

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.

1 Answers1

2

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

commandbreak
  • 969
  • 4
  • 6