The problem is that TSKill is only available as a 64-bit application. When
you run the command from within the 32-bit VB script, it can't see the
64-bit Windows\System directory. What it sees is the 32-bit version of the
directory which doesn't have tskill. You'll need to find a different way to
kill the process.
--
Charlie.
http://msmvps.com/blogs/russel
"iwhitman2055" <> wrote in message
news

CB6FF23-C81C-4A63-9940-...
> I'm maintaining a VB6 COM application, which sometimes fails to shutdown
> properly (I think due to a certain scanner driver, but that's not the
> point
> at the moment). I've come up with a solution that has worked fine on
> 32-bit
> OS's:
>
> As my program shuts down, it runs a second program (also written in VB6)
> whose only function is to wait a few seconds and then shell "TSKILL <name
> of
> first program>". If my program did not exit on its own, this kills it.
>
> But it fails to work on Windows 7 - 64 bit. The "kill me" program runs
> without error, but it doesn't shut down its target.
>
> TSKILL works fine when I run it at a command prompt.
>
> Any ideas on how I can achieve the "kill me" effect for my application?