I have a .net console application written in c# which does exactly what it should when run inside visual studio and when clicking the .exe file in the file system. It runs like
It seems like a permissions issue to me. Running the code inside VS is way too different to running it on its own. VS takes care of most of the stuff and makes life easy for the developer.
Can you please check if the account you are using to run the scheduled task has permission to access the network path?
You should grant to the specified user access to COM automation factory:
Faced with similiar problem, when application normally is worked as expected, but when i run it from the scheduled task, it's immediately closing, and throws an error: "File path not found ...".
Fixed it with setting scheduled task action parameter:
Start In (optional): c:\my application\executable folder path
The first of all, take a look on this http://support.microsoft.com/?id=257757
You can try few things:
C:\Windows\SysWOW64\config\systemprofile\Desktop
(or \System32\
if your system is 32x)