1
We have an application that runs on a schedule, setup in Task Scheduler. This task is created programatically by our configuration application.
Now, the application needs to access files in a specific directory, the default path a subdirectory in the currently logged in user's home directory.
We have tried setting it up using the SYSTEM account but it doesn't have access to the files and the task quits as soon as it runs.
Normally, we set it up with an administrator's password and flag to run when the user is logged in or not. However, some clients install this app on a system that doesn't require a login, means having a blank or no password. If we setup the task and manually change it to run without them logged in, it requires a password of some sort.
How can I programatically (using C# or VB.net) create this task to run where it will not:
- Require an administrator or user password to run or setup
- Be able to access the files in "almost" any directory
- Be able to run whether any user is logged in or not
- Not require creating a new user to run this under
The systems installed on range from Windows Server 2008 to Windows 10.