Guest ShadowTek Posted October 18, 2008 Posted October 18, 2008 I have an application that hangs occationally, and I need to script a forced reboot. I tried to manually use "shutdown -r -f", but it didn't work. I then manualy closed all open applications with thier GUI close program buttons and that worked just fine. I thought that the whole purpose of the "-f" switch was to deal with stuck applications?
Guest Ron Hardin Posted October 18, 2008 Posted October 18, 2008 Re: How to force a reboot? My suspicion is that cmd shutdown doesn't flush the filesystem, from the time it takes coming up again, at least under XP Home, so I don't use it. I gather it's busy recovering from the journaling. Can't help with the gui question though. -- rhhardin@mindspring.com On the internet, nobody knows you're a jerk.
Guest ShadowTek Posted October 18, 2008 Posted October 18, 2008 Re: How to force a reboot? Ron Hardin <rhhardin@mindspring.com> wrote in news:48FA384D.4234 @mindspring.com: > My suspicion is that cmd shutdown doesn't flush > the filesystem, from the time it takes coming up > again, at least under XP Home, so I don't use it. > I gather it's busy recovering from the journaling. > > Can't help with the gui question though. So what's the point of having a "-f" switch if it doesn't really work?
Guest who? Posted October 18, 2008 Posted October 18, 2008 Re: How to force a reboot? "ShadowTek" <fake@email.address> wrote in message news:Xns9B3B962E4F61Epsistormyamatocscom@85.214.105.209... >I have an application that hangs occationally, and I need to script a > forced reboot. I tried to manually use "shutdown -r -f", but it didn't > work. I then manualy closed all open applications with thier GUI close > program buttons and that worked just fine. > > I thought that the whole purpose of the "-f" switch was to deal with stuck > applications? perhaps you need to specify a time to shutdown .. like so: shutdown.exe -s -f -t 00
Guest philo Posted October 18, 2008 Posted October 18, 2008 Re: How to force a reboot? "ShadowTek" <fake@email.address> wrote in message news:Xns9B3B962E4F61Epsistormyamatocscom@85.214.105.209... > I have an application that hangs occationally, and I need to script a > forced reboot. I tried to manually use "shutdown -r -f", but it didn't > work. I then manualy closed all open applications with thier GUI close > program buttons and that worked just fine. > > I thought that the whole purpose of the "-f" switch was to deal with stuck > applications? Your syntax is wrong, you have used the *nix notation. With Windows it is a "switch" http://www.ss64.com/nt/shutdown.html
Guest ShadowTek Posted October 18, 2008 Posted October 18, 2008 Re: How to force a reboot? "who?" <dsshd@sdasfvrrrrrnnnnrrrrsfffff.invalid> wrote in news:gddovh$rr6$1@aioe.org: > perhaps you need to specify a time to shutdown .. like so: > shutdown.exe -s -f -t 00 No, without specifying a time, the default is set to 30 seconds. When I normally do it this way, it works just fine. But, that last time I tried it, it started the countdown at 30 and then just froze.
Guest ShadowTek Posted October 18, 2008 Posted October 18, 2008 Re: How to force a reboot? "philo" <philo@privacy.net> wrote in news:erzJRZXMJHA.1204@TK2MSFTNGP05.phx.gbl: > Your syntax is wrong, > you have used the *nix notation. > > > With Windows it is a "switch" > > http://www.ss64.com/nt/shutdown.html Ah hell. lol Thanks.
Guest Big_Al Posted October 18, 2008 Posted October 18, 2008 Re: How to force a reboot? ShadowTek wrote: > I have an application that hangs occationally, and I need to script a > forced reboot. I tried to manually use "shutdown -r -f", but it didn't > work. I then manualy closed all open applications with thier GUI close > program buttons and that worked just fine. > > I thought that the whole purpose of the "-f" switch was to deal with stuck > applications? %windir%\System32\shutdown.exe -s -t 0 -s = shutdown -t = time to wait = 0 seconds. %windir%\System32\shutdown.exe -r -t 0 -r = restart -t = time to wait = 0 seconds.
Guest philo Posted October 19, 2008 Posted October 19, 2008 Re: How to force a reboot? "ShadowTek" <fake@email.address> wrote in message news:Xns9B3BC54D543B8psistormyamatocscom@85.214.105.209... > "philo" <philo@privacy.net> wrote in > news:erzJRZXMJHA.1204@TK2MSFTNGP05.phx.gbl: > > > Your syntax is wrong, > > you have used the *nix notation. > > > > > > With Windows it is a "switch" > > > > http://www.ss64.com/nt/shutdown.html > > Ah hell. lol > > Thanks. Post back if it does not work... but I expect no problems!
Guest ShadowTek Posted October 19, 2008 Posted October 19, 2008 Re: How to force a reboot? "philo" <philo@privacy.net> wrote in news:Oa7nO9XMJHA.4772 @TK2MSFTNGP03.phx.gbl: > Post back if it does not work... > but I expect no problems! I correctly tried "shutdown /r /f" before with a previous version of this program, but it would freeze at the "Saving System Settings..." part of the shutdown process. But it would always hang at that point, even if I tried to manually reboot through the GUI. This latest version of the offending program doesn't seem to interfere with the shutdown process in the same way. It will hang at the "Saving System Settings..." screen for a minute and then it will shutdown normally. So I'll have to wait for it to have another glitch before I can test it again. Btw, the offending program is Compuserve dailup connection software.
Guest philo Posted October 19, 2008 Posted October 19, 2008 Re: How to force a reboot? "ShadowTek" <fake@email.address> wrote in message news:Xns9B3CC2CA988Apsistormyamatocscom@85.214.105.209... > "philo" <philo@privacy.net> wrote in news:Oa7nO9XMJHA.4772 > @TK2MSFTNGP03.phx.gbl: > > > Post back if it does not work... > > but I expect no problems! > > I correctly tried "shutdown /r /f" before with a previous version of this > program, but it would freeze at the "Saving System Settings..." part of the > shutdown process. But it would always hang at that point, even if I tried > to manually reboot through the GUI. > > This latest version of the offending program doesn't seem to interfere with > the shutdown process in the same way. It will hang at the "Saving System > Settings..." screen for a minute and then it will shutdown normally. > > So I'll have to wait for it to have another glitch before I can test it > again. > > > Btw, the offending program is Compuserve dailup connection software. Aha! It could *possibly* be due to some small glitch in the modem or it's software. If it were my machine, I'd try a different modem. Heck I have a box of spare modems !
Guest ShadowTek Posted October 19, 2008 Posted October 19, 2008 Re: How to force a reboot? "philo" <philo@privacy.net> wrote in news:Ojq3wsdMJHA.5232@TK2MSFTNGP05.phx.gbl: > Aha! > > > It could *possibly* be due to some small glitch in the modem or it's > software. > If it were my machine, I'd try a different modem. > > Heck I have a box of spare modems ! Yeah, but I just bought this serial modem so that I could use it with Ubuntu. I've got several Win-modems lying around too, but I need something that can be used by OSs other than Windows. I tried all the Lin-modem drivers, but they haven't come up with anything functional for the Win- modems that I have. I'm content to simply script a reboot and program restart in order to automatically deal with the problem once it has been detected. If I can get it to reboot successfully, then that's good enough for me. Compuserve is a real pain in the ass, but it's the only local dailup ISP that doesn't smother you with connection time or bandwith restrictions. If it wern't for the need for proprietary handshakes, then I could simply use native Linux apps to connect to my ISP.
Guest ShadowTek Posted October 25, 2008 Posted October 25, 2008 Re: How to force a reboot? ShadowTek <fake@email.address> wrote in news:Xns9B3C98302FBD7psistormyamatocscom@85.214.105.209: > Compuserve is a real pain in the ass, but it's the only local dailup > ISP that doesn't smother you with connection time or bandwith > restrictions. If it wern't for the need for proprietary handshakes, > then I could simply use native Linux apps to connect to my ISP. OK, the glitch happened again and I had a chance to try things out. It turns out that using dashes (-) IS the correct syntax for shutdown command options, and I did in fact do things correctly in my first post. (shutdown /f /r does not even work) So, I tried "shutdown -f -r" again, and the same things happended: the shutdown dialog box that displays the start of the default 30 second countdown appeared, but then it froze and never progressed. I tried to abort the shutdown with "shutdown -a", but nothing happened, and any further attempts to initiate shutdown commands other than "-a" would return the error that a shutdown was already in progress. So, I tried to kill the Compuserve software process by using "kill -s sigkill -p wcs2000.exe", which successfully killed that process. The previously frozen shutdown dialog disappeared, and the shutdown process was apparently aborted. After all of this, I then tried to shutdown again by simply using "shutdown -r", which finally worked this time. So, the lesson to be learned seems to be that shutdown.exe doesn't want to work at all until the Compuserve process "wcs2000.exe" is first killed.
Recommended Posts