Windows XP(SP2) shuts down automatically

Windows XP(SP2) shuts down automatically

Secure Home | Search | About
 Microsoft Antivirus Discussions    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content add this group's latest topics to your Google content
Subject Author Date
Windows XP(SP2) shuts down automatically Uri Dimant 07-11-2006
Posted by Uri Dimant on July 11, 2006, 3:23 am
If you were  Registered and logged in, you could reply and use other advanced thread options
Hello everyone

It was going very well for 7 moths since I got the computer. Suddenly,
yesterday my Windows started shuts down automatically WITHOUT any error.
It might be 15 minutes or couple of hours and at the end it is asways shuts
down and it does not matter whether connected to the internt or not

And since I got the computer I have not installed/altered /updgrade any
system things except WINDOWS UPDATE ..



I have done
1) Ad-Aware (not found virus)
2) Spybot (not found virus)
3)Mcafee 8.0 Enterprise (not found virus)



What are the next steps shouldn i go? Does it relate to the hardware as
well?

Thanks



Posted by Scherbina Vladimir on July 11, 2006, 3:45 am
If you were  Registered and logged in, you could reply and use other advanced thread options
Yes, it may relate to hardware as well.

Is your computer a notebook? Several monthes ago such case appeared with
notebook and was activly discussed on *.kernel NG. The OP solved problem by
writing small application which handles WM_QUERYENDSESSION windows message
and returns FALSE - as a result Windows stopped shutdowning. Yes, it was a
"quick hack" but OP was really glad that his computer stoped shutdowning
automatically without a reason.

--
Vladimir

> Hello everyone
>
> It was going very well for 7 moths since I got the computer. Suddenly,
> yesterday my Windows started shuts down automatically WITHOUT any error.
> It might be 15 minutes or couple of hours and at the end it is asways
> shuts down and it does not matter whether connected to the internt or not
>
> And since I got the computer I have not installed/altered /updgrade any
> system things except WINDOWS UPDATE ..
>
>
>
> I have done
> 1) Ad-Aware (not found virus)
> 2) Spybot (not found virus)
> 3)Mcafee 8.0 Enterprise (not found virus)
>
>
>
> What are the next steps shouldn i go? Does it relate to the hardware as
> well?
>
> Thanks
>
>



Posted by Uri Dimant on July 11, 2006, 4:21 am
If you were  Registered and logged in, you could reply and use other advanced thread options
Vova (speak russian)?
> Is your computer a notebook?

No , it isn't

> writing small application which handles WM_QUERYENDSESSION windows message
> and returns FALSE - as a result Windows stopped shutdowning. Yes, it was a
> "quick hack" but OP was really glad that his computer stoped shutdowning
> automatically without a reason.

Cn you point me to the OP's solution or the app's code?

Thanks



> Yes, it may relate to hardware as well.
>
> Is your computer a notebook? Several monthes ago such case appeared with
> notebook and was activly discussed on *.kernel NG. The OP solved problem
> by writing small application which handles WM_QUERYENDSESSION windows
> message and returns FALSE - as a result Windows stopped shutdowning. Yes,
> it was a "quick hack" but OP was really glad that his computer stoped
> shutdowning automatically without a reason.
>
> --
> Vladimir
>
>> Hello everyone
>>
>> It was going very well for 7 moths since I got the computer. Suddenly,
>> yesterday my Windows started shuts down automatically WITHOUT any error.
>> It might be 15 minutes or couple of hours and at the end it is asways
>> shuts down and it does not matter whether connected to the internt or
>> not
>>
>> And since I got the computer I have not installed/altered /updgrade any
>> system things except WINDOWS UPDATE ..
>>
>>
>>
>> I have done
>> 1) Ad-Aware (not found virus)
>> 2) Spybot (not found virus)
>> 3)Mcafee 8.0 Enterprise (not found virus)
>>
>>
>>
>> What are the next steps shouldn i go? Does it relate to the hardware as
>> well?
>>
>> Thanks
>>
>>
>
>



Posted by Scherbina Vladimir on July 11, 2006, 4:47 am
If you were  Registered and logged in, you could reply and use other advanced thread options
> Vova (speak russian)?

:) Yes we can, but the rest of the group would not understand us, plus the
msnews.microsoft.com will not accept cyrrilcs in this NG.

[...]
> Cn you point me to the OP's solution or the app's code?

You may read the whole thread:
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_frm/thread/ee0b892e1f0e7a8d/6d7005fbb9585df5?tvc=1&q=computer+is+shutdowning#6d7005fbb9585df5

I don't remember whether he provided his source code but it should be
trivial. Make the window, in it's window procedure handle WM_QUERYENDSESSION
message. So, basically the code will look like this: (it may not compile
cause I was getting it from MSDN/my memory)

void DoCancelShutdown()
{
HWND hMainWndHandle = CreateWindow("STATIC", "szTitle", WS_OVERLAPPEDWINDOW,
0, 0, 13, 13, NULL, NULL, g_hInstance, NULL);

if (hMainWndHandle != NULL)
{
LONG lPrev = SetWindowLong(m_hMainWndHandle , GWL_WNDPROC,
reinterpret_cast<LONG>(MainPartWndProc));

MSG msg = ;
BOOL bRet;

while( (bRet = GetMessage( &msg, NULL, 0, 0 )) != 0)
{
if (bRet == -1)
{
// handle the error and possibly exit
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}

}
}

/* wnd proc */
LRESULT WINAPI MainPartWndProc(HWND hWnd, UINT uMessage, WPARAM wParam,
LPARAM lParam)
{
switch (uMessage)
{
case WM_QUERYENDSESSION:
return FALSE; /// RETURN FALSE
break;
case WM_ENDSESSION:
return FALSE; /// RETURN FALSE
break;
}

return DefWindowProc(hWnd, uMessage, wParam, lParam);
}

--
Vladimir



Posted by Uri Dimant on July 11, 2006, 5:04 am
If you were  Registered and logged in, you could reply and use other advanced thread options
Thanks

However, I see, now that the OP upgrated the memory to 1.5gb the problem is
occured. .Well, I'm going to give my PC to the out technical person to
check out any hardware issues.

Thank you again







>> Vova (speak russian)?
>
> :) Yes we can, but the rest of the group would not understand us, plus the
> msnews.microsoft.com will not accept cyrrilcs in this NG.
>
> [...]
>> Cn you point me to the OP's solution or the app's code?
>
> You may read the whole thread:
>
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_frm/thread/ee0b892e1f0e7a8d/6d7005fbb9585df5?tvc=1&q=computer+is+shutdowning#6d7005fbb9585df5
>
> I don't remember whether he provided his source code but it should be
> trivial. Make the window, in it's window procedure handle
> WM_QUERYENDSESSION message. So, basically the code will look like this:
> (it may not compile cause I was getting it from MSDN/my memory)
>
> void DoCancelShutdown()
> {
> HWND hMainWndHandle = CreateWindow("STATIC", "szTitle",
> WS_OVERLAPPEDWINDOW, 0, 0, 13, 13, NULL, NULL, g_hInstance, NULL);
>
> if (hMainWndHandle != NULL)
> {
> LONG lPrev = SetWindowLong(m_hMainWndHandle , GWL_WNDPROC,
> reinterpret_cast<LONG>(MainPartWndProc));
>
> MSG msg = ;
> BOOL bRet;
>
> while( (bRet = GetMessage( &msg, NULL, 0, 0 )) != 0)
> {
> if (bRet == -1)
> {
> // handle the error and possibly exit
> }
> else
> {
> TranslateMessage(&msg);
> DispatchMessage(&msg);
> }
> }
>
> }
> }
>
> /* wnd proc */
> LRESULT WINAPI MainPartWndProc(HWND hWnd, UINT uMessage, WPARAM wParam,
> LPARAM lParam)
> {
> switch (uMessage)
> {
> case WM_QUERYENDSESSION:
> return FALSE; /// RETURN FALSE
> break;
> case WM_ENDSESSION:
> return FALSE; /// RETURN FALSE
> break;
> }
>
> return DefWindowProc(hWnd, uMessage, wParam, lParam);
> }
>
> --
> Vladimir
>
>



Similar ThreadsPosted
Windows Firewall automatically disabled August 23, 2005, 12:30 am
Windows XP shuts down... on antivirus scan March 30, 2007, 5:17 am
Pc was log off automatically when log in June 20, 2008, 7:12 pm
Hosts file gets deleted automatically. July 16, 2007, 4:59 am
PC shuts off on Virus Scan September 23, 2005, 7:22 pm
Any window with the name Virus or AntiVirus shuts down automatical February 18, 2006, 11:19 pm
Trojan found; Internet Explorer shuts down May 10, 2006, 11:28 am
Re: Windows Trojan January 20, 2006, 6:01 pm
Windows.ActiveDesktop February 7, 2006, 5:16 pm
Windows Defender September 6, 2006, 6:24 am

The site map in XML format XML site map

Contact Us | Privacy Policy