Solved

Creating a detached process?

Posted on 2001-07-12
3
910 Views
Last Modified: 2013-12-28
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?
0
Comment
Question by:mellor
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 6278888
>>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...
0
 

Author Comment

by:mellor
ID: 6280012
Thanks - for the bad news!!
0
 
LVL 86

Expert Comment

by:jkr
ID: 6281037
Sorry - you might want to take a look int svrany.exe from the resource kit to make things easier...
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question