Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
mindingulove

Force close programs on shutdown

Recommended Posts

Posted (edited)

Hello

Recently I created a bat file that syncs a folder via SSH using winscp. 

The cmd shell is hidden by a program called window.exe and opens at startup.

the problem is that every time I gotta showdown windows needs to force end that task

is there any way of forcing windows 95 on ending programs at shutdown without prompting for ask? 

I know that there are command lines shortcuts and so, but is it possible to modify the original start menu shutdown option?

thank you 

 

Edited by mindingulove

Share this post


Link to post
Share on other sites

Is that Windows 98?

Try with an ATX shutdown:

http://www.robvanderwoude.com/shutdown.php

RUNDLL32 KRNL386.EXE,exitkernel

Or use a program to execute something at shutdown, see here as an example:

https://msfn.org/board/topic/44186-run-batch-scripts-on-shutdown/

or - maybe - something here:

http://www.ericphelps.com/shutdown/index.htm

may be of use.

jaclaz

Share this post


Link to post
Share on other sites

Many years ago at a company, everyone had very slow Windows NT 4 systems that would take AGES to shut down. Due to scheduling requirements, users had to shutdown or restart their computer at the end of their shift while on the clock. BUT this typically would result in someone having to stick around for 10-20 minutes longer than required. I didn't want to do this, so I used the registry to speed my shutdown/restart time to a more reasonable timeframe like 10-20 seconds.

I'm not sure if it is what you want, because it is relating to all programs... maybe an atom bomb vs a hammer comparison.

WaitToKillAppTimeout used with AutoEndTasks:
https://technet.microsoft.com/en-us/library/cc978624.aspx

This will force close all programs on shutdown and not wait the default period of time and/or there should not be any programs that keep the OS from completing the shutdown process.

  • Like 1

Share this post


Link to post
Share on other sites
32 minutes ago, Tripredacus said:

Many years ago at a company, everyone had very slow Windows NT 4 systems that would take AGES to shut down. Due to scheduling requirements, users had to shutdown or restart their computer at the end of their shift while on the clock. BUT this typically would result in someone having to stick around for 10-20 minutes longer than required. I didn't want to do this, so I used the registry to speed my shutdown/restart time to a more reasonable timeframe like 10-20 seconds.

I'm not sure if it is what you want, because it is relating to all programs... maybe an atom bomb vs a hammer comparison.

WaitToKillAppTimeout used with AutoEndTasks:
https://technet.microsoft.com/en-us/library/cc978624.aspx

This will force close all programs on shutdown and not wait the default period of time and/or there should not be any programs that keep the OS from completing the shutdown process.

Good reference, which leads us to :

http://www.proffs.nu/brutus.htm

http://www.proffs.nu/readme.txt

Quote

If "Try to end applications automatically" (only available if the operating system is Windows 2000 Service Pack 3 or 4, Windows XP, or Windows Server 2003) is checked in Brutus Control Panel, it will try to make the following settings in the Windows Registry:

HKEY_CURRENT_USER\Control Panel\Desktop\AutoEndTasks = "1"

HKEY_CURRENT_USER\Control Panel\Desktop\HungAppTimeout = "3000"

HKEY_CURRENT_USER\Control Panel\Desktop\WaitToKillAppTimeout = "10000"

The AutoEndTasks is Windows 2000 and later only.

jaclaz

Share this post


Link to post
Share on other sites

Perhaps it was only the WaitToKillAppTimeout entry that was used for NT 4.

Share this post


Link to post
Share on other sites
Posted (edited)
26 minutes ago, Tripredacus said:

Perhaps it was only the WaitToKillAppTimeout entry that was used for NT 4.

Seems like it was working on NT 4.0 :) also, though registry path is slightly different, http://www.angelfire.com/az/TucsonCactus/NThacks.htm :

Quote

 

033 » Can't shutdown without "killing" an application.

When I used to Logoff or ShutDown, WOWEXEC would invariably not respond and I would have to press "End Task".

Edit HKEY_USER\.DEFAULT\Control Panel\Desktop and add value AutoEndTasks REG_SZ. Set it to 1.

Edit HKEY_USER\YourUserId\Control Panel\Desktop and add value AutoEndTasks REG_SZ. Set it to 1.

This forces any task, that does not respond to the shutdown, to end.

You can also Add Value of WaitToKillAppTimeout with type REG_SZ.

The default: is 20000 milliseconds (20 seconds). If the user process does not end by this time, AutoEndTasks is invoked.

 

And also for NT 3.5:

https://web.archive.org/web/20070807211633/http://support.microsoft.com/kb/123058

But the OP is still presumably about 9x, where I don't think that it would, maybe on Me? :unsure:

Or maybe it does :dubbio:

http://franck.kiechel.free.fr/dbr_eng/Shutdown.htm

jaclaz

Edited by jaclaz
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×