Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows 64 Bit > TSKILL not TSKILLing under WOW64

Reply
Thread Tools Display Modes

TSKILL not TSKILLing under WOW64

 
 
iwhitman2055
Guest
Posts: n/a

 
      12-11-2009
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?
 
Reply With Quote
 
 
 
 
Charlie Russel - MVP
Guest
Posts: n/a

 
      12-11-2009

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
newsCB6FF23-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?


 
Reply With Quote
 
Charlie Russel - MVP
Guest
Posts: n/a

 
      12-12-2009

Thanks for the addon. I only speak PowerShell these days, where we have
Stop-Process, and I couldn't remember the old way. ;-)

--
Charlie.
http://msmvps.com/blogs/russel




"Stefan Pendl" <> wrote in message
news:...
> On Fri, 11 Dec 2009 16:30:47 -0800, "Charlie Russel - MVP"
> <> wrote:
>
>>
>>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.

>
> Use TASKKILL instead, which is available as 32 and 64-bit version on
> 64-bit Windows.
>
> ---
> Stefan Pendl
>
> Windows Vista SP2
> AMD Turion X2 RM-70 2 GHz
> 4 GB RAM


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59