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...
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...
"If sex doesn't scare the cat, you're not doing it right."
ich habe windows xp 64
und ich bin geschockt
denn hier ist komischerweise ein limit... nicht gut :(
@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.
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.
Edit: just seen your edit, maybe it works like that, who knows...
Edit 2: aaaaab, maybe psshutdown works for you
Last edited by anon; 03.10.08 at 22:59.
"I just remembered something that happened a long time ago."
jay, perfekt ...
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
Last edited by aaaaab; 03.10.08 at 23:52.
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.
"I just remembered something that happened a long time ago."
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
*deutsche und englische dialoge gemischt o.O
Mm, I don't understand, what were you originally looking for at the Group Policies?
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
"I just remembered something that happened a long time ago."
always-on-top window is not the problem
but i can't use shutdown as unprivileged user o.O
[:edit]
precisely
Last edited by aaaaab; 04.10.08 at 01:15.
Ah, I understand now.
Check if PowerOff 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.
"I just remembered something that happened a long time ago."
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
[:edit]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.
och man, ist doch alles scheiße...
es gibt viele gute shutdown programme,
doch leider scheitern sie an meinen sonderwünschen :-(
Last edited by aaaaab; 04.10.08 at 09:35.
... 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.
(if the admin account is called Administrator)Code:runas /user:Administrator "shutdown -r -f -t N"
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
(note it's savecred, NOT savedcred!)Code:runas /user:Administrator /savecred notepad.exe- 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:
(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)Code:runas /user:Administrator /savedcred "shutdown -r -f -t N"- Restart Windows and check if it works...
"I just remembered something that happened a long time ago."
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...
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.
"I just remembered something that happened a long time ago."
Bookmarks