Kiquenet
Kiquenet

Reputation: 15036

MsBuild Error MSB3073: The command exited with code 128

I have msbuild file (.target) and I execute it in remote machine using psexec.

I get the following error:

error MSB3073: The command "attrib -R "C:\scripts\doc*.*" /S /D" exited with code 128.

I don't understand why attrib command fails, what is means code 128 error for attrib ?

Any suggestions about it ?

The target is:

  <Target Name="CopyPdf">

  ...
    <Exec Command="attrib -R &quot;$(RutaDestinoDocumentosParaAgentes)\*.*&quot; /S /D" IgnoreExitCode="false" WorkingDirectory="C:\WINDOWS\system32"/>
  </Target>

Upvotes: 0

Views: 4095

Answers (1)

Thierry Franzetti
Thierry Franzetti

Reputation: 1863

I assume you checked the command on the target computer to check it works.

When using psexec, you can specify the user it will run on the target machine. Are you sure the user has rights to files ? To check this, you can use Process Monitor to check access on file system. You'll be able to see if some files cannot be accessed.

Upvotes: 2

Related Questions