Jump to content

windows98se - shutdown problem - programmer's Q


xrayer

Recommended Posts

Hi,

Since I installed W98SE on new MB with new VGA and drivers I have shutdown problem (as many others) - it hangs on shutting down screen or in text screen with blinking cursor instead shutdown. In few cases it even shutdown properly, but it's absolutely random :P. So I use restart + manual shutdown instead. But for some cases autoshutdown will be good to have.

My idea is to make a shutdown script which will setup some flag and perform restart. I will need to put some my code at the end just BEFORE windows restarts. I need help of some programmer here who knows WHERE. I have written a simple code which can setup ICH registers to shutdown system (calling APM bios service didn't work for me when in windows). Then I will test some flag if shutdown/or reboot is required and then exec my code if needed (or skip to restart).

Currently I have more simple version which have some disadvantages:

system needs to reboot to dos/win98 and then shutdown. Before that computer beeps at POST and VGA fan is quite noisy before nv drivers are loaded so it's not good at night...

I do it simple way: when shutdown required (I use WinOFF as timer with reboot option) I call a batch before which create some file on C:\. After reboot in autoexec.bat I perform a test if this file exists and if yes I delete it and run DOS shutdown program which finally shutdown the PC.

Link to comment
Share on other sites


I have shutdown problem (as many others) - it hangs on shutting down screen or in text screen with blinking cursor instead shutdown.

Could it be possible that it's back in DOS? This is roughly the same behaviour as you could get on an pre APM or ACPI machine running W95, without logos.sys.

In that case you could change msdos.sys:

BootGUI=0

and autoexec.bat:

<snip>

C:\Windows\win.com

shutdown

When windows fails to shutdown, it will return to the command prompt, which will excute next command in line.

Link to comment
Share on other sites

I have shutdown problem (as many others) - it hangs on shutting down screen or in text screen with blinking cursor instead shutdown.

Could it be possible that it's back in DOS? This is roughly the same behaviour as you could get on an pre APM or ACPI machine running W95, without logos.sys.

No, it doesn't fall back to DOS. I have working APM as I said sometimes it shutdown OK (I mean full shutdown of ATX PSU). If it hangs and I have to do reset, then I got scandisk on next start so it signalize that shutdown was not completly done. I tried various patches, I use unofficial SP but nothing helps. So I want to do my way.

BTW I found that win.com is called at last of shutdown process, it also contain code for APM shutdown. But when it hangs it's BEFORE win.com executed so it doesn't shutdown. I also cannot reboot to dos from windows. When I use restart instead then win.com is never called. Probably windows doesn't try to switch back to realmode and just do reset. I need to find where's the reset sequence to insert some code before.

Edited by xrayer
Link to comment
Share on other sites

I have shutdown problem (as many others) - it hangs on shutting down screen or in text screen with blinking cursor instead shutdown.

Could it be possible that it's back in DOS? This is roughly the same behaviour as you could get on an pre APM or ACPI machine running W95, without logos.sys.

No, it doesn't fall back to DOS. I have working APM as I said sometimes it shutdown OK (I mean full shutdown of ATX PSU). If it hangs and I have to do reset, then I got scandisk on next start so it signalize that shutdown was not completly done. I tried various patches, I use unofficial SP but nothing helps. So I want to do my way.

BTW I found that win.com is called at last of shutdown process, it also contain code for APM shutdown. But when it hangs it's BEFORE win.com executed so it doesn't shutdown. I also cannot reboot to dos from windows. When I use restart instead then win.com is never called. Probably windows doesn't try to switch back to realmode and just do reset. I need to find where's the reset sequence to insert some code before.

Using Nvidia 3 chipset, FoxComm mobo, Athlon sempron: fairly new PC which I built last year: I solved the shutdown problem by installing freeware win98Lite (also solved defrag restarting) and by using "Restart in MS-Dos Mode" -which SHUTS down the PC (!).

Very very occasionally I find that I need a clean reboot before shutting down. Maybe one day in a hundred and usually when the PC has been on all day and lots of programs have been run. HTH

Link to comment
Share on other sites

You mean 98lite (http://www.litepc.com/)?

I though it is for removing unwanted apps during installation like nLite for WinXP.

Yes that appears to be the site. He (Australian guy IIRC) did lite for win98Se then moved on to XP later.

I've been using the 98 Lite on my win98SE pcs for years.

I've tried with/without Lite and always found them more stable after Lite was installed. Opinions may vary of course, but IMO doing a C:\ partition backup (to be on safe side) and installing Lite is worthwhile.

Link to comment
Share on other sites

So it can be installed after win98se instalation? well I check this. Of course I have already backup of windir and pgmfilez handy to restore if i mess it up by my experiments. An advantage of 2 (or more win systems - backup each other :)

Link to comment
Share on other sites

About shutdown problem - I'm 100% sure that it's caused by nvidia drivers because when I switch to standard PCI VGA then I can shutdown properly and even reboot to dos and return back to win. Once I switch to nV drivers it hangs again. I think it is nearly impossible to patch this bug in drivers so i'm trying to find other way. It seems that last module before reset is user.exe which is also responsible to display shutdown logo.

Link to comment
Share on other sites

BTW I found that win.com is called at last of shutdown process, it also contain code for APM shutdown.

Are you sure about that? I wanted to use this information to prevent my (ACPI) computer from powering itself down. (I'm using a central switch to power off the computer and all peripherals. When the computer powers itself down you can easily forget to use the switch, spoiling about 25 Watts)

So I renamed win.com to winorig.com, wrote a new win.com which only beeps once with the internal speaker, and put it in \Windows, did the BootGUI=0 trick, and launched windows (winorig.com) from autoexec.bat. It still powers off the computer, and I didn't hear a beep.

Well, maybe Windows 'knows' which file lauched it? So from within Windows I renamed Win.com etc. Didn't help. I filled Win.com with junk from within Windows, for the case Windows uses the start sector, didn't help either.

So I think Win.com isn't involved in shutdown, or it is loaded in memory, and waits till Windows returns to do it's trick.

I found this link about the win /Z parameter. This works on my computer. So ACPI is downcompatible with APM, or Win.com contains poweroff code for both APM and ACPI.

Link to comment
Share on other sites

About shutdown problem - I'm 100% sure that it's caused by nvidia drivers.
I back you up on that. It even became the main problem with recent nvidia drivers. Try older drivers, you'll see they didn't have this kind of consequences.

What you wanna do is identify exactly at what point things go wrong? Seems like a good idea. Good luck on that.

Link to comment
Share on other sites

Are you sure about that? I wanted to use this information to prevent my (ACPI) computer from powering itself down.

Yes Im'm sure. At first you find win.com /z feature yourself so APM shutdown code is really there. Even I saw somewhere patched win.com version which didn't shutdown PC. I was trying this: boot up my wins an replace win.com with simple prog which light keyboard LEDs and then I do

1) shutdown - It light up

2) reboot to dos - It light up

3) reboot - It didn't light up

Somewhrere I readed that on shutdown windows are trying to switch back to realmode and needs to successfully terminate all PM drivers. This is a place where it stucks. When doing just reboot it's not necessary, reboot is done from PM.

I would need some logger which saves as much possible events happening on reboot.

Link to comment
Share on other sites

Hi,

Since I installed W98SE on new MB with new VGA and drivers I have shutdown problem (as many others) - it hangs on shutting down screen or in text screen with blinking cursor instead shutdown. In few cases it even shutdown properly, but it's absolutely random :P. So I use restart + manual shutdown instead. But for some cases autoshutdown will be good to have.

Three or four years ago, I had the same problem. I looked around and finally found a patch for it, and here's an updated/expanded (2007) Windows 98 SE shutdown supplement version at Microsoft:

http://support.microsoft.com/kb/239887

Another Win 98 Shutdown problem:

http://support.microsoft.com/kb/260067

More 98 troubleshooting tips at Microsoft Windows 98 Solution Center:

http://support.microsoft.com/ph/1139

Tweak your Win 98SE c:\windows\system.ini, c:\windows\win.ini, c:\config.sys, and c:\autoexec.bat files per MDGx guides at: http://www.mdgx.com/newtip98.htm

Edited by fastlanephil
Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...