Sorry I have slightly altered the code and forgot the write the semicolon, it was there in the original when called before.
I had already run it in the debugger, but now I tried it as a service as well: In a debugger, it works. But now as a service even my small test script doesn't work.
So to summarize: My program does not work in the debugger or as a service, but as a command line (everything with administrator privileges). My small test script does work from command line and in the debugger but not as a service. The error they report is always the same (53). It seems I now have two (possibly related) errors: One not allowing me to run the program as a service and one in my program which stops me from executing it anywhere but a command prompt. How do I go on from here?
| [reply] |
Rather than running sscep.exe, have you tried running a shell command like dir to prove you have a shell available in debugger or service? or tried running something like "perl -e" print 'hello world'" in debugger or service to prove you can run exes at all?
Your app, sscep.exe, might be multithreaded, and has a watchdog thread on it console writing thread, if you run it in a debugger, and sscep notices console writes are taking too long (because perl isn't collecting the lines since its frozen in a debugger), sscep can abort with random errors. When running as a service, as BrowserUK said, permissions. I'm not sure what happens if a service tries to draw a GUI from its service/local system account. Also stop using double quotes for your paths in Perl. You run the risk (how much I'm not sure) of creating control characters with those escapes, which can lead to your error 53 bad path.
| [reply] |