Is the output file your are trying to redirect to on a network drive? A Windows service does not have permission/privileges to access a network file, or access a network drive.
| [reply] |
No. It is directed to local disk c: on a FAT32 filesystem. I am wondering that if service under LocalSystem can not replace the STDOUT for the program to be launched.
| [reply] |
Is it possible that the LocalSystem account is not inheriting the PATH variable, and not finding the program ?
Have you tried it with a fully qualified path to "mycmd" ?
To get a feel for what the environment is, change your code to run "cmd /k" without redirection. Also, you need to setup your service to "allow interaction with the desktop". Then you can see what rights are available to the command prompt.
"When you are faced with a dilemma, might as well make dilemmanade.
"
| [reply] |