Shutdown Batchfile
Maehmann 09.09.2003 -
20:33 799
11
Maehmann
OC Addicted
|
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
1 x 4 Ringe
|
iirc @echo off
shutdown -e
wegen der extension bin i ma ned sicher
|
spunz
ElderElder
|
pskill oder kill.exe suchen und batchjob schreiben:
kill itouch.exe shutdown -a(?)
|
Maehmann
OC Addicted
|
thx  gleich mal testen ... : )
|
Flip
1 x 4 Ringe
|
spunz -a kannst auf kein fall sein damit verhinderst rpc shutdown afaik
|
spunz
ElderElder
|
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
1 x 4 Ringe
|
ah genau
|
Maehmann
OC Addicted
|
@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
1 x 4 Ringe
|
hm endlosschleife?
komisch
häng ein end hinten an (<- falls des im batch geht..)
|
Maehmann
OC Addicted
|
end ist kein gültiger befehl  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
1 x 4 Ringe
|
pf da rennt ja nur das prog durch und der shutdown cmd wird ned beachtet...
probier amal nur shutdown cmd
|
Maehmann
OC Addicted
|
dann passiert genau garnichts ... es kommt nur eine leere Dos Box auch mit -f das gleiche 
|