Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Server Task Scheduler needs files to be in System32 folder?

I have made a C# console application which needs 2 config files for booting. When I run it from cmd window it runs fine-finds the 2 config files(which are placed within the exe produced directory).

However,when using the Windows server task scheduler i get an excpetion - " Could not find file 'C:\Windows\system32\field.config' "

I tried to use a bat file for the task but same issue occurs-task scheduler tries to find the files in System32 direcory.

Placing the two config files within System32 direcory is a workaround but is there any other way? Googled for similar issues but no information at all. Any help is mutch appriciated.

like image 794
fdhsdrdark Avatar asked Dec 01 '22 01:12

fdhsdrdark


1 Answers

I know this is old but figured I'd put my finding here incase anyone stumbles on this.

On Properties>Action, it seems to be the "Start in (optional)" field on the action edit screen where you type the directory you want the working directory to be located.

like image 52
John Avatar answered Dec 28 '22 09:12

John