Article View: borland.public.cppbuilder.nativeapi
Article #1032How to keep a Process running after user logs off
From: Paul
Date: Wed, 14 Nov 2007 04:39
Date: Wed, 14 Nov 2007 04:39
21 lines
1260 bytes
1260 bytes
Hi, I have googled for asnwers to this question. One way seems to be to use CreateProcessWithLogon. I have attempted this in the following sequence LogonUser(..) CreateEnvironmentBlock(..) GetUserProfileDirectory(..) CreateProcessWithLogon(..) CloseHandle(..) 's This starts the process OK - Task Manager shows it belonging to the alternate user. Logging off this session causes the process started as the alternate user to close also. Am I heading in the right direction ? Any Missing steps ? Other clues ? thanks Paul
Technical Details
Message-ID:
<473a8a10$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5b3e8d07685d8c18,start X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Paul" <paulm@xacom.com.au> Subject: How to keep a Process running after user logs off Newsgroups: borland.public.cppbuilder.nativeapi User-Agent: XanaNews/1.18.1.6 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 NNTP-Posting-Host: 203.5.1.209 Message-ID: <473a8a10$1@newsgroups.borland.com> Date: 13 Nov 2007 21:39:28 -0700 X-Trace: newsgroups.borland.com 1195018768 203.5.1.209 (13 Nov 2007 21:39:28 -0700) Lines: 22 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail