سؤال

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.

هل كانت مفيدة؟

المحلول 2

I came to the conclusion that this is not possible.

نصائح أخرى

The exe/dll files have to be there before you try to install them. psexec has a -c flag to copy over the application you're trying to run.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top