1

I want to use msdeploy to start a batch file on my remote server.

Usage is like

msdeploy.exe -verb:sync -allowUntrusted:true -source:runCommand="c:/scripts/x.bat" -dest:auto,computerName=https://server:8172/msdeploy.axd?site=xxx,userName=xxx,password=xxx,authType=basic

The x.bat is executed on the remote server. One part of the x.bat is to delete a local file - that works. Then I want to kill a process on that remote server via "taskkill /FI "WindowTitle eq X" /f", but I get the message that no tasks are found.

When I run the x.bat on the remote server, the tasks are killed just fine...

2
  • I solved the problem with the taskkill - for some reason the window title filter did not work, but it worked by using the exe name instead. Commented May 30, 2020 at 14:01
  • The next problem is: I want to start an exe file in the batch file using start "title" job.exe, but that does not work either Commented May 30, 2020 at 14:02

2 Answers 2

1

I solved my problem by using schstart to schedule a task which runs one minute later the batch file

Sign up to request clarification or add additional context in comments.

Comments

0

according to taskkill documentation:

Remarks: The WINDOWTITLE and STATUS filters are not supported when a remote system is specified.

according to start documentation:

Title: Specifies the title to display in the Command Prompt window title bar.

So this title is for cmd window itself not job.exe

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.