Shutdown Batchfile

Seite 1 von 1 - Forum: Windows auf overclockers.at

URL: https://www.overclockers.at/windows/shutdown_batchfile_92050/page_1 - zur Vollversion wechseln!


Maehmann schrieb am 09.09.2003 um 20:33

Sers

Ich habe folgendes Problem:

Ich besitze ein Logitech Internetnavigator Keyboard. Um alle Funktionen nutzen zu können muss das Programm iTouch.exe laufen.

Leider hat dieses Programm einen Bug, der den Computer beim Herunterfahren/Benutzer wechseln/Abmelden eine lange Verzögerung hervorruft.
Wenn man das Programm per Hand beendet, funktioniert alles ganz normal.

Jetzt würde ich gern eine Batchdatei schreiben mit der das Prog beendet wird und anschließend der PC herunterfährt.
Leider habe ich davon genau keine ahnung ... :(

Kann mir jemand helfen?

*tia*

Christoph

PS: OS ist WinXp mit SP1 und allen Hotfixes ...


Flip schrieb am 09.09.2003 um 20:36

iirc

Code:
@echo off
shutdown -e

wegen der extension bin i ma ned sicher


spunz schrieb am 09.09.2003 um 20:37

pskill oder kill.exe suchen und batchjob schreiben:

kill itouch.exe
shutdown -a(?)


Maehmann schrieb am 09.09.2003 um 20:39

thx :D
gleich mal testen ... : )


Flip schrieb am 09.09.2003 um 20:42

spunz -a kannst auf kein fall sein damit verhinderst rpc shutdown afaik


spunz schrieb am 09.09.2003 um 20:46

mangels windows kann ich es nicht testen, aber laut google sollte -s funktionieren:

Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]

No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)


Flip schrieb am 09.09.2003 um 20:47

ah genau


Maehmann schrieb am 09.09.2003 um 21:00

@echo off
pskill itouch.exe
shutdown -s

so sieht mein Batchfile aus ... der Prozess wird auch gekillt ...

Leider hängt das Batchfile anschließend in einer Endlosschleife ... der PC fährt nicht herunter :(


Flip schrieb am 09.09.2003 um 21:05

hm endlosschleife?

komisch

häng ein end hinten an (<- falls des im batch geht..)


Maehmann schrieb am 09.09.2003 um 21:14

end ist kein gültiger befehl :(

pckill.jpg

so sieht das ganze aus mit der "Endlosschleife"

Das komische ist, dass das Icon der Anwendung noch immer im Tray ist und auch der Prozess anscheinend noch immer läuft.
Wenn man nach dem Batchfile über das Icon im Tray fährt verschwindet es, aber der Prozess läuft noch immer :(

Das gleiche passiert auch mit kill.exe :(

Kann sein, dass sich der Prozess nicht killen läßt?


Flip schrieb am 09.09.2003 um 21:18

pf da rennt ja nur das prog durch und der shutdown cmd wird ned beachtet...

probier amal nur shutdown cmd


Maehmann schrieb am 09.09.2003 um 21:23

dann passiert genau garnichts ... es kommt nur eine leere Dos Box
auch mit -f das gleiche :(




overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2026