views:

11

answers:

1

I have a batch file that will bounce a clickOnce app:

@REM The odd PING statements are to create a 5 second wait
@echo off
taskkill /F /IM MyApp.exe
PING 1.1.1.1 -n 1 -w 5000 >NUL
"%USERPROFILE%\Path\To\My\App.appref-ms"

This works fine when I double-click it: the process is killed and then restarted after 5 seconds.

However, if I schedule the task, it kills the process, but doesn't restart it.

Does anybody know what's going on? (The task is running as the same user I am logged on as when I double click the batch file and all works well)

Thanks

Ryan

A: 

ClickOnce is designed for desktop applications, console apps, xbap apps, and VSTO add-ins. It's meant to have interaction with the user. What does your application do?

RobinDotNet