PDA

View Full Version : [Windows XP] [XP] regelmäßige neustarts



aaaaab
03.10.08, 19:38
hoi,
da ich ja ein halbwegs ausgeprägter leecher bin
lasse ich mein PC auch mal länger laufen,
besonders wenn man mal länger nicht da ist

da ein pc nie perfekt läuft kann es mal passieren,
dass das netzwerk sich irgendwie abwürgt
und wenn ich mal ne woche weg bin,
dann läuft der PC eine woche ohne zu saugen...

deswegen möchte ich ihn regelmäßig neustarten...
am besten irgendwie als eigenständiger/unabhäniger windows dienst

weis jemand wie ich das bewerkstelligen kann?

anon
03.10.08, 20:09
You could combine CL Enhancer and the Windows Task Scheduler to run cle cold reboot every N hours/days...

aaaaab
03.10.08, 20:25
das problem ist das keine neue programme gestartet werden können
bzw. das dieser fall als fehler eintreten könnte...
deswegen als dienst, wo das programm schon aktiv ist...

was ist ein 'CL Enhancer'
kann mir gerade nichts darunter vorstellen...

shoulder
03.10.08, 20:33
Eine wirklich simple Lösung wäre eine Batch Datei oder ein VB Script, welches sich nach dem hochfahren startet und nach einer festgelegten Zeit den PC neustartet.

aaaaab
03.10.08, 20:37
hey ja genau...
warum ich nicht selbst darauf gekommen bin... :D

aber ich glaube ich habe kein recht auf ein neustart
weil ich als eingeschrenkter benutzer laufe...

[:edit] schutdown geht leider nicht
der timer ist limitiert auf max. 600 sekunden
also alle 10 min will ich den pc nicht neustarten :P

Butcho
03.10.08, 21:01
Du könntest mal versuchen ob es mit dem Neustart so klappt:

Start->Ausführen
shutdown -r -f -t 0

shoulder
03.10.08, 21:02
was ist ein 'CL Enhancer'Ein Kommandozeilen Tool zur System Steuerung.
Du kannst es hier (http://www.sb-innovation.de/f69/cl-enhancer-multi-use-tool-4624/) finden.

anon
03.10.08, 21:04
@sh: thanks for posting "my" tool, hehe! :smile:
If you google "cl enhancer" with the quotes, we're 2nd! :top:

@Butcho: don't forget the -f, or else the shutdown process can be suspended just because of a stupid Notepad window having been left open and asking whether to save a file, for example. :smile:

Butcho
03.10.08, 21:10
Yes you're right anon, but i've already updated my post before i saw you tip... :wink:

anon
03.10.08, 21:13
Didn't see the update :redface:

:top:

aaaaab
03.10.08, 21:37
die shutdown rechte kann ich irgendwo in den gruppenrichtlinie einstellen...
muss nur noch finden wo genau :P

wie gesagt ein tool was ein weiteres tool startet ist nicht die lösung
es sollte ein eigenständiges tool sein das notfalls radikal neustartet...

anon
03.10.08, 21:47
die shutdown rechte kann ich irgendwo in den gruppenrichtlinie einstellen...
muss nur noch finden wo genau :P

Maybe this (http://www.online-tech-tips.com/windows-xp/xp-prevent-shutdown/)?


wie gesagt ein tool was ein weiteres tool startet ist nicht die lösung
es sollte ein eigenständiges tool sein das notfalls radikal neustartet...

The only thing I can come up with right now is running shutdown -r -f -t N (N = amount of seconds before reboot; 1hr=3600s) on Windows startup, so that when you start your PC the countdown to reboot has already started...

shoulder
03.10.08, 21:48
Du kannst es auch mit einem VB Script machen.


wscript.sleep x
set wshell = CreateObject("Wscript.shell")
wshell.run "shutdown -r -f -t 0"
x = Wartezeit
1000 = 1 Sekunde

Den Code mit angepasster Wartezeit in eine TXT Datei kopieren und als *.vbs abspeichern.
Dann in den Autostart kopieren und starten.

aaaaab
03.10.08, 22:37
das große problem ist das der windows shutdowntimer nut maximal -t 600 unterstützt...
the big problem ist, that the windows shutdown-timer has a limit of 600 seconds...

@anon
dein tool ist eigendlich nicht schlecht, es fehlt nur noch ein unlimitierter timer
your tool is very good, but it has not a (unlimited) timer

anon
03.10.08, 22:46
It doesn't have such limit here:
http://img528.imageshack.us/img528/733/shutdownqw6.gif
I can PM you my (spanish) shutdown.exe if you want...

Butcho
03.10.08, 22:48
Du kannst ja noch ein einfaches sleep x in dein Script einbauen.
Oder du machst es mit t=timer()+x ... while timer()<t
Das sollte dann klappen...

aaaaab
03.10.08, 22:52
ich habe windows xp 64
und ich bin geschockt
denn hier ist komischerweise ein limit... nicht gut :(

anon
03.10.08, 22:54
@Butcho: it seems that he doesn't want the solution to be based on a running EXE but something more like a Windows service - in the sense that it's running always in the background and doesn't need to be run when needed, but just contacted - so that it's assured that his PC will reboot when the time barrier is hit - with running another EXE you risk getting a "rundll32 application couldn't be initialized - press OK to terminate" error and the app itself not running. At least this is what I understood. :smile:
From my point of view the workaround I've posted should fit these requirements since it'd be always running and would call a system function to shutdown when time comes, and not launch another program. Of course you have to deal with the "going to shutdown" window being always on top and appearing as an "entry" in Alt+Tab. :frown:

Edit: just seen your edit, maybe it works like that, who knows... :smile:

Edit 2: aaaaab, maybe psshutdown (http://www.microsoft.com/technet/sysinternals/utilities/psshutdown.mspx) works for you :top:

aaaaab
03.10.08, 23:51
jay, perfekt :top:...

aber das mit der gruppenrichtlinie
hat irgendwie nicht funktioniert o.O

ich musste es rückgänig machen,
da ich 'log off' aus dem startmenü entfernt habe
und den CMD zugriff gesperrt hatte... sehr merkwürdig

anon
03.10.08, 23:57
:top:

You may re-enable CMD by going to the HKEY_CURRENT_USER\Software\Policies\Microsoft \Windows\System registry key and deleting the DisableCMD DWORD value, and the log off button by going to the HKEY_CURRENT_USER\Software\Microsoft\Windows \CurrentVersion\Policies\Explorer key (can also be HKEY_LOCAL_MACHINE) and deleting the NoLogOff DWORD value.

aaaaab
04.10.08, 00:29
ok... nochmal von vorn...
ich bin ein eingeschrenkter user
und will mir das shutdown recht geben.

der guppenrichtlinien-guide-link hat mir irgendwie geholfen
bei dem denglisch* was auf mein swystem herrscht ist es auch kein wunder :D

*deutsche und englische dialoge gemischt o.O

anon
04.10.08, 00:34
Mm, I don't understand, what were you originally looking for at the Group Policies? :confused2:

For now it'd seem that making shutdown run with Windows is the most viable choice, but you have to cope with the always-on-top window - it can be moved to the clock area so that only a tiny bit of it remains visible though :smile:

aaaaab
04.10.08, 01:02
always-on-top window is not the problem
but i can't use shutdown as unprivileged user o.O

[:edit]
precisely

anon
04.10.08, 01:16
Ah, I understand now. :smile:

Check if PowerOff (http://users.telenet.be/jbosman/applications.html) works as an unprivileged user: it can be used both as a command-line or GUI program and has an scheduler, which sounds exactly like what we're looking for: you can leave it running, having started with Windows, and it'll reboot your PC automatically. :top:

aaaaab
04.10.08, 09:11
mir ist gerade aufgefallen,
dass ich das shutdown programm eigendlich als dienst starten wollte

darum habe ich versucht PsShutdown als dienst zu installieren
das hat zwar geklappt, aber der dienst läuft nicht


Dienst "Name..." wurde auf "Lokaler Computer" gestartet und dann angehalten. Einige Dienste werden automatisch gestartet und dann angehalten, wenn sie sich im Leerlauf befinden, wie z.B. Leistungsprotkoll-und Alarmierungsdienst.

[:edit]
och man, ist doch alles scheiße...
es gibt viele gute shutdown programme,
doch leider scheitern sie an meinen sonderwünschen :-(

anon
04.10.08, 18:27
... The only thing I can think of now is running shutdown as Administrator on Windows startup, using the runas command, unless you're sharing your PC and that's why you're running as an unprivileged user.

runas /user:Administrator "shutdown -r -f -t N"
(if the admin account is called Administrator)

This should pose no security risk, as only the shutdown.exe process will have admin privileges.

It'd ask for the Admin password, though, which of course wouldn't be automated, as you'd need to type it by hand every time, but won't be there to do so next time Windows starts...

To work around this:

Open cmd
type

runas /user:Administrator /savecred notepad.exe
(note it's savecred, NOT savedcred!)
You'll be asked for the admin account's password. Type it and press ENTER.
Notepad should open. Close it.
The admin account's password should be saved. You should now set this to run on Windows startup:

runas /user:Administrator /savedcred "shutdown -r -f -t N"
(note this time it's savedcred and NOT savecred like before - the D makes a huge difference! And of course N is the amount of hours you want your comp to run before rebooting multiplied by 3600)
Restart Windows and check if it works...

aaaaab
04.10.08, 18:33
the problem is
shutdown must start automatically

the pc is for 5 days not under user control
no one is there who can enter the password every 12 hours...

anon
04.10.08, 18:36
That's why I have posted the savecred workaround... you only need to do it once and the Admin password will be saved for further ocasions, unless you change it - in this case you'd need to redo the procedure.