Pre-Logoff script or properly shutting down an application at shutdown..

  • Thread starter Thread starter Homer Simpson
  • Start date Start date
H

Homer Simpson

I need to know how to make a pre-logoff script for XP Pro. I have a
program that must be shut down properly by exiting the program before
shutdown/logoff....

Is this possible?
 
On Sat, 07 Jul 2007 15:33:37 -0400, Homer Simpson wrote in message
<news:ihqv831n4bbd7c83910rhq4qt63ad2ss9r@4ax.com>:

> I need to know how to make a pre-logoff script for XP Pro. I have a
> program that must be shut down properly by exiting the program before
> shutdown/logoff....
>
> Is this possible?


Here is a VBS script I found on the Net. The author is Marty Lindsay. This
example uses the process rsh.exe

-------

ProcessToKill = "rsh.exe"
Set WMI=GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery
("select * from Win32_Process")
For Each Process in WMI
If process.name = ProcessToKill Then
Process.terminate
End If
Next

------

Save with the ending .vbs and put it on your desktop.
 
Re: Pre-Logoff script or properly shutting down an application atshutdown..

[Homer Simpson] wrote-:
> I need to know how to make a pre-logoff script for XP Pro. I have a
> program that must be shut down properly by exiting the program before
> shutdown/logoff....
>
> Is this possible?


Yes. Use the taskkill command :
TASKKILL.exe /im processname

Good Luck, Ayush.
--
XP-Tips [Change the thumbnail picture of a folder] :
http://www.microsoft.com/windowsxp/using/setup/tips/folderpic.mspx
 
On Sun, 08 Jul 2007 17:38:36 -0600, Ayush wrote in message
<news:#o5rjzbwHHA.4612@TK2MSFTNGP04.phx.gbl>:

> [Homer Simpson] wrote-:
>> I need to know how to make a pre-logoff script for XP Pro. I have a
>> program that must be shut down properly by exiting the program before
>> shutdown/logoff....
>>
>> Is this possible?

>
> Yes. Use the taskkill command :
> TASKKILL.exe /im processname


I have no such command as 'taskkill.exe' (and I've never heard of it,
either). Or did you misspell it?
 
Re: Pre-Logoff script or properly shutting down an application atshutdown..

[Iceman] wrote-:
>> Yes. Use the taskkill command :
>> TASKKILL.exe /im processname

>
> I have no such command as 'taskkill.exe' (and I've never heard of it,
> either). Or did you misspell it?


Taskkill is only available to XP Pro & Windows 2003. Are you using XP Home ?

Taskkill:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/taskkill.mspx
http://www.computerhope.com/taskkill.htm


Good Luck, Ayush.
--
XP-Tips [Create a keyboard shortcut to open a folder] :
http://www.microsoft.com/windowsxp/using/setup/tips/foldershortcut.mspx
 
On Wed, 11 Jul 2007 07:09:20 -0600, Ayush wrote in message
<news:eu5lKC8wHHA.4628@TK2MSFTNGP02.phx.gbl>:

> [Iceman] wrote-:
>>> Yes. Use the taskkill command :
>>> TASKKILL.exe /im processname

>>
>> I have no such command as 'taskkill.exe' (and I've never heard of it,
>> either). Or did you misspell it?

>
> Taskkill is only available to XP Pro & Windows 2003. Are you using XP Home ?


On this computer, yes. The answer occurred to me later. Thank you for the
info an link.
 
Back
Top