I have an msbuild script that installs a service on my DEV environment using psexec. This all works fine. Now that I want to run it against UAT, where instead of the service exe being located on a shared folder on the app server, it's located on the NAS/a network folder, I get an error.
Is this possible to achieve using psexec?
The following works:
psexec.exe \\my-app-server -u DOMAIN\MyServiceAccount -p MyServiceAccountPassword \\my-app-server\MyShare\MyService.exe install /instance:DEV
But this doesn't work:
psexec.exe \\my-app-server -u DOMAIN\MyServiceAccount -p MyServiceAccountPassword \\my-NAS\MyShare\MyService.exe install /instance:UAT1
I get the error
PsExec could not start \\my-NAS\MyShare\MyService.exe on my-app-server:
The system cannot find the file specified.
Here is the msbuild script generating the above:
<Exec Command="psexec \\$(TargetServer) -u $(ServiceAccountUn) -p $(ServiceAccountPw) $(TargetServiceInstallPath) install /instance:$(Environment)"/>
I have tried running psexec direct from the command line as well, so I guess msbuild doesn't really have anything to do with the problem, as this gives the same result.
I came to the conclusion that this is not possible.