Task Scheduler won't run ClickOnce Application

55 Views Asked by At

I have written a console application that downloads a file from an FTP site. I published it as a ClickOnce application. The application works perfectly when launched from my user account on the server where it's deployed.

I tried to set up a task scheduler task that launches the program using the SYSTEM account. The task runs but the application never launches. There are no errors noted in the history of the task scheduler. The "Run with highest privileges" option is selected.

I've run a test batch file script from the SYSTEM account in task scheduler and it runs fine.

I also tried to run the ClickOnce application using the NETWORK SERVICE account in task scheduler to no avail. I made sure the accounts have access to the folder containing the clickonce application. I also tried using the "Start In" field and leaving it blank with the same result.

I copied the entire debug folder to the server and was able to get the task scheduler to launch the .exe build. The task scheduler ran that as expected but it won't run the compiled .application. Is there a particular way clickonce applications need to be published using .net8 to be able to run in task scheduler?

0

There are 0 best solutions below