Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Add/Remove Programs & Launching a Process During Uninstall

19 views
Skip to first unread message

zet...@gmail.com

unread,
Nov 30, 2005, 4:42:52 PM11/30/05
to
Hello,

I have an Uninstaller which needs to launch an app before it's finished
doing its thing. This works fine, however, when the Uninstaller is
launched through Add/Remove Programs, the ARP applet remains
locked/frozen until the child process goes away. I'm assuming that the
ARP applet is looking at all child processes of the uninstaller and
isn't allowing focus until all of them are gone.

How can I detach my child process from the Uninstaller so that the ARP
won't unfreeze? I've tried just about every thread/process attribute
for CreateProcess() and nothing seems to work. I've even tried
ShellExecute() and WinExec() but I get the same results.

I've searched the "Internets" quite a bit looking for a solution, but
all I've found are people asking the same question and no answers.

Does anyone know of a solution to this?

Thanks!

Kellie Fitton

unread,
Nov 30, 2005, 5:52:25 PM11/30/05
to
Hi,

Can you post the sourceCode that shows how you are launching
all the "child" processes by the uninstaller program ?

Kellie.

zet...@gmail.com

unread,
Nov 30, 2005, 6:01:47 PM11/30/05
to
As I said, I've tried many different methods. CreateProcess(),
ShellExecute() and WinExec(), but regardless of how I launch it, or
what settings I use when launching it... the ARP applet still detects
the child processess.

I think the answer may lie somewhere with "Job Objects" that ARP may be
using to track what my Uninstaller is launching. That would also
explain why this isn't a problem on 9x.

Alex Blekhman

unread,
Dec 1, 2005, 7:04:37 AM12/1/05
to
zet...@gmail.com wrote:
> I think the answer may lie somewhere with "Job Objects"
> that ARP may be using to track what my Uninstaller is
> launching. That would also explain why this isn't a
> problem on 9x.

If you suspect Job object in action, then you can try
CREATE_BREAKAWAY_FROM_JOB flag for CreateProcess call.
However, it's subject to JOB_OBJECT_LIMIT_BREAKAWAY_OK
property of job itself, which you cannot control from your
uninstaller. In any case, it worths a try.

Another solution can be Scheduler service. You can create
new job and schedule it for one second from current time.
So, the new process will by child of scheduler service and
not of your uninstaller.

In order to use system scheduler you can call AT
command-line command or utilize Win32_ScheduledJob WMI
class.

HTH
Alex


0 new messages