BackGroundWorker issue on Vista x64

  • Thread starter Thread starter BR
  • Start date Start date
B

BR

Hi,

I am writing a small utility to perform system maintainence tasks on
Windows. In this, I am launching a MMC snapin as a process using
BackGroundWorker and using the "RunWorkerCompleted" event handler to
know when the snapin was closed. This works fine on Xp and Vista 32
bit and the RunWorkerCompleted event handler is called when the snapin
is closed. But on Vista 64, the RunWorkerCompleted event is called as
soon as the snapin is launched.

Has anyone seen this before? Is this a bug or am I missing something
basic.

Thanks,
BR
 
Hi,

I am writing a small utility to perform system maintainence tasks on
Windows. In this, I am launching a MMC snapin as a process using
BackGroundWorker and using the "RunWorkerCompleted" event handler to
know when the snapin was closed. This works fine on Xp and Vista 32
bit and the RunWorkerCompleted event handler is called when the snapin
is closed. But on Vista 64, the RunWorkerCompleted event is called as
soon as the snapin is launched.

Has anyone seen this before? Is this a bug or am I missing something
basic.

Well I don't think that's really the way to use background worker.
You use it to run long running code in the background not to launch
other processes. If you want to know when the process is closed, use
the System.Diagnostics.Process class to start and monitor when the
process exits.
 
Well I don't think that's really the way to use background worker.
You use it to run long running code in the background not to launch
other processes. If you want to know when the process is closed, use
the System.Diagnostics.Process class to start and monitor when the
process exits.

I agree with Andy. However, for an explanation of the behaviour being
observed, it's possibly related to the fact that there are two MMCs on
64 bit, and in some circumstances the wrong one is started, sees that,
launches the correct one and then exits.

http://technet2.microsoft.com/Windo...0933-4bd5-9740-45356872b7761033.mspx?mfr=true

discusses this briefly in point (2).

Damien
 
Back
Top