1

So when i use the following command in a CMD window warp-cli disconnect && taskkill -im "Cloudflare WARP.exe" && cd "C:\Program Files\Cloudflare\Cloudflare WARP" && "Cloudflare WARP.exe" everything works as expected but when i use this in task scheduler like so: TASK SCHEDULER WINDOW

Nothing happens.

Under the Add arguments section I use the following command /k warp-cli disconnect && taskkill -im "Cloudflare WARP.exe" && cd "C:\Program Files\Cloudflare\Cloudflare WARP" && "Cloudflare WARP.exe"

any help would be appreciated

3
  • if you make a cloudflare.bat file and fill it with warp-cli disconnect && taskkill -im "Cloudflare WARP.exe" && cd "C:\Program Files\Cloudflare\Cloudflare WARP" && "Cloudflare WARP.exe" and set the task scheduler to run that instead, does it work?
    – Narzard
    Commented Oct 27, 2022 at 19:25
  • @Narzard saving it as .bat file works but i would not prefer that. Commented Oct 27, 2022 at 20:55
  • try wrapping the entire thing aside form /k in double quotes. /k "warp-cli disconnect && taskkill -im "Cloudflare WARP.exe" && cd "C:\Program Files\Cloudflare\Cloudflare WARP" && "Cloudflare WARP.exe""
    – Narzard
    Commented Oct 27, 2022 at 21:56

1 Answer 1

0

I suggest setting the Start in as the path to the warp application executables rather than relying on the cd command to change to that directory so at execution, it is already there.

Since the program you are starting is explicitly defined with the full path to cmd.exe setting start in to the warp directory should help you resolve the problem.

Task Scheduler Configuration

  • Program/Script:
C:\Windows\System32\cmd.exe
  • Add arguments:
/k start "" "warp-cli" disconnect && taskkill -im "Cloudflare WARP.exe" && "Cloudflare WARP.exe"
  • Start in:
"C:\Program Files\Cloudflare\Cloudflare WARP"

Supporting Resource

7
  • This also gives the same behaviour..nothing...unfortunately Commented Oct 30, 2022 at 12:06
  • Later I tried this command in the arguments section with the start in column blank: /k timeout 2 && warp-cli disconnect && timeout 2 && taskkill -im "Cloudflare WARP.exe" && timeout 2 && cd "C:\Program Files\Cloudflare\Cloudflare WARP" && timeout 2 && "Cloudflare WARP.exe", but this only workes till warp-cli disconnect after which it does not work. Commented Oct 30, 2022 at 12:14
  • @AwesomeVk47 I just updated my answer for add argurments to use start and the syntax of start "" warp-cli disconnect then it goes to taskkill, etc. See if that helps, otherwise Call may work if you play with it some instead. Commented Oct 30, 2022 at 16:44
  • unfoertunately that did not work either..and as far as i can see call command is used to start another batch file right? Commented Nov 3, 2022 at 9:58
  • @AwesomeVk47 See if that edit I just now made makes a difference. I assume not but forgot double quote around program after title empty double quote for start "" "warp-cli" disconnect. Call or Start both can call other batch files or other executable files too. I'm not familiar with the warp tools you are using and I do not have it installed, but wonder if not using warp-cli disconnect at all and removing it and using taskkill /f /im "Cloudflare WARP.exe" alone then some time out would work. Where is warp-cli located, the same folder as Cloudflare WARP.exe or not? Commented Nov 3, 2022 at 14:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .