Creating a detached process?

I am having dificulity creating a detached process. (Not to be confused with an NT service)
Currently the only way I can create a fully detached process is by writing a 'start' command to a temporary file then calling 'CreateProcess' with a command like:
 'cmd.exe /c at 20:15 temporaryfile.bat'. This is jumping though hoops, and the NT schedular service has to be running.
Calling CreateProcess() with the DETACHED_PROCESS flag with or without CREATE_NEW_PROCESS_GROUP does not seem to create a process that continues running after a user logs off. Also ShellExecute() does not seem to have a way of creating a detached process.
Any ideas?
Who is Participating?
jkrConnect With a Mentor Commented:
>>does not seem to create a process that continues running
>>after a user logs off

Well, *only* services are not terminated when a user logs off...
mellorAuthor Commented:
Thanks - for the bad news!!
Sorry - you might want to take a look int svrany.exe from the resource kit to make things easier...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.