Jump to content

New RS uses forceful shutdown


majstang

Recommended Posts

OH NO.....! :sadwalk:

The new Recording Service uses forceful shutdown. It forces all open applications to close, even an open DVBViewer client which normally denies ordinary shutdown. My Intercept Shutdown Script for Windows 7...does not work any more :( This script is probably the only way to be abled to delay standby/hibernation on Win7 there is.

Is this change planned or could it be some kind of misstake? I do really hope you guys could consider going back to normal shutdown again.

:bye:

Link to comment
Is this change planned or could it be some kind of misstake?

No nothing has changed, the function call is unchanged since the start of the recording service.

 

So the reason must be something else...

Link to comment

No nothing has changed, the function call is unchanged since the start of the recording service.

 

So the reason must be something else...

Hmm, strange! Seems I must do some backtracing then. The shutdown call made from within RS totally ignore the usual system query (Shutdown interception fails) and forces every open application to close instantly. Pretty much what a Force-PowerOff does. Both WinXP and Win7 are affected. The only thing I've done is cleaning out all old DVBViewer installations and made some new ones with DVBV 4.5 and RS 1.6.5.2 on both systems.

Edited by majstang
Link to comment
The shutdown call made from within RS totally ignore the usual system query Shutdown interception fails)

yes that's normal with vista/windows 7. You simply CAN'T stop the shutdown or hibernate or standby. neither WM_QUERYENDSESSION nor PBT_APMQUERYSTANDBY or PBT_APMQUERYSUSPEND do work anymore. Never did by the way.

Link to comment

No, you are wrong, my friend! You can stop/intercept Shutdown, Restart and LogOff, but not Standby and Hibernation on Vista and higher.

Reason for not being abled to stop standby/hibernation no more is these OS are created for laptops (saving of battery power).

I would know cuz, I have succesfully blocked/intercepted shutdown up until now with my Shutdown Script for Windows 7 http://www.DVBViewer.tv/forum/topic/41387-another-intelligent-hibernationscript/page__view__findpost__p__308989 ;)

Link to comment

You, are right though if you were referring to Force-Shutdown...that one cant be intercepted.

Well, what ever! I will do some testing tomorrow and see if I can find the cause for this little misshap.

:bye:

Link to comment

After some testing this is what I came up with:

http://www.DVBViewer.tv/forum/topic/41387-another-intelligent-hibernationscript/page__view__findpost__p__315218

 

How about my suggestion? Are you going to keep DVBViewer replying false to Shutdown? If you change this to true you can also remove the Force-Shutdown command from RS...hope hope :original: It makes no sence keeping it if you are using Force-Shutdown from RS anyway.

Edited by majstang
Link to comment

Did some observations i have some questions about. When doing some experimenting with sending the reboot command in a script from a RS task.

- On WinXP the command goes through and are recognized as a non-forceful reboot. The reboot gets done with a graceful shutdown.

- On Win7 the command goes through and are recognized as reboot, but somehow something goes wrong here and recording service seems to apply the force flag to the original non-forceful reboot command. The reboot gets done with a forceful shutdown.

 

Could this be a bug?

Link to comment

Since when does the service offer a reboot? I'm sorry but all the actions haven't been change since 2006, so I don't see where your problem originates. :(

Link to comment

Since when does the service offer a reboot?

No, I'm aware of that! Using that command was only to test and see if the Recording Service (or possibly the Service Control Manager) corrupted the reboot with applying a forceflag to a command which has no force flag what so ever originally. And yes sending the non-forceful reboot command from RS as an process task through the RS Task menu, the force flag was mystical enough applied. Doesn't matter what non-forceful shutdown commands I use the forceflag gets applied.

 

I'm sorry but all the actions haven't been change since 2006, so I don't see where your problem originates. :(

Well, that might explain what is going on here! What you are saying is the Recording Service poweraction handling was programmed before the Vista release (Nov30 2006) and since MS did some changes regarding shutdown handling in the Service Control Manager from Vista, that could explain the peculiar behaviour. RS is programmed for the XP Service Control and that would be why this very thing works without a hitch on XP and not on Win7. Only a theory ;) As a scripter I'm always unhappy when my scripts fails mysteriously. I do apologize, I do not intend to step on anybodys toes here...I just wanna make it known there might be a bug here in need of assessment.

 

Regards

Majstang

:bye:

Link to comment
  • 1 month later...

I did just test this change on new RS:

Change: The Service does not use "force" anymore on PC shutdown.

 

Turns out on Windows 7, RS still forces shutdown. I tested by opening a notepadsheet and keyed in some words and then executed the shutdown task in RS. Win7 then closed the notepadsheet forcefully without giving me an opportunity to save it first (well the save box appeared but were closed within a couple of seconds). This app does with great certainty reply false to the WM_QUERYENDSESSION.

The fullscreen Force-Shutdown UI where ShutdownBlockReason for the notepadsheet should be displayed does not appear as it does when initiating a shutdown from Windows startmenu. RS shutdown task also forces DVBViewer to close without giving a ShutdownBlockReason.

 

Same procedure on WinXP gives a quite another result. Here everything works as intended and shutdown gets cancelled when the menu saying Windows can not close cuz an application awaits some input from you.

 

http://msdn.microsoft.com/en-us/library/ms700677(VS.85).aspx

Edited by majstang
Link to comment
×
×
  • Create New...