Solved

Creating a detached process?

Posted on 2001-07-12
3
918 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Do Not Reply on Exchange 2010 1 37
URGENT: Re-install Windows 10 using same license? 18 76
Windows 2008 set profile 9 16
SCSM reports export 1 19
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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 …
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

821 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