PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Rechner Runterfahren


Azzi
05.05.2002, 21:23
wie bekomme ich es hin das ein WIN98 PC vom programm herunter gefahren wird?


chuckafucka
05.05.2002, 21:36
du musst einfach nur die RunDll32.exe mit bestimmten Parametern ausführen lassen. Das sollte alles sein:


RunDll32.exe Shell32.dll,SHExitWindowsEx 0x1


chuckafucka :D

Felix Kaiser
05.05.2002, 22:10
*alternativ*

ExitWindowsEx(uFlags,0);

Für uFlags:
EWX_REBOOT - Neustart
EWX_LOGOFF - Abmelden
EWX_POWEROFF - Ausschalten

Codeq
06.05.2002, 11:54
DOS ECHO G=FFFF:0000 ¦ DEBUG Reboot (warm boot, sometimes cold boot)(2)
Win31* ECHO G=FFFF:0000 ¦ DEBUG Popup Task Manager, sometimes reboot
Win9* RUNDLL USER.EXE,ExitWindows Shutdown (3)
Win9* RUNDLL USER.EXE,ExitWindowsExec Win95: various results, usualy fast shutdown (and lock PC), sometimes restart Windows, sometimes reboot.
Win98: Restart Windows, sometimes reboot.
Win9* RUNDLL SHELL.DLL,RestartDialog "System Settings Change, Do you want to restart your computer now?" dialog
Win98/ME RUNDLL32 SHELL32.DLL,SHExitWindowsEx n Where n can be any combination (sum) of the following numbers: (4)
0 Logoff
1 Shutdown
2 Reboot
4 Force
8 Poweroff

Win98/ME RUNONCE.EXE -q Reboot (4)
NT RUNDLL32 USER32.DLL,ExitWindowsEx
RUNDLL32 USER32.DLL,ExitWindowsEx Logoff (most systems require the command to be called twice before logging off)
NT+RK SHUTDOWN /L /T:10 /Y /C Shutdown in 10 seconds, close without saving (can be stopped during those 10 seconds using SHUTDOWN /A)
NT+RK SHUTDOWN /L /R /T:0 /Y Immediate shutdown & reboot
Kix $RC = SHUTDOWN( "\\server", "Shutting down...", 10, 1, 0 ) Shutdown in 10 seconds, with message, close without saving, no reboot
Kix $RC = SHUTDOWN( "\\server", "", 0, 1, 1 ) Immediate shutdown & reboot
Kix $RC = LOGOFF( 1 ) Logoff, forcing applications to close (use 0 instead of 1 if you don´t want to force applications to close)
OS/2 START /PM SHUTDOWN && EXIT Shutdown (5)
OS/2 SETBOOT /IBD:C: Unconditional shutdown & reboot
OS/2 SETBOOT /IBA:nonsense Unconditional shutdown & failing reboot (6)
OS/2 LOGOFF Logoff (both LAN Server client and Peer)

Azzi
06.05.2002, 18:34
#include <stdio.h>

void main()

{

printf(&quot;Eine Taste zum Beenden des PCs bitte.&quot;);

if(getchar())
{

/*was muss ich hier jetzt einbauen? bin noch ein ziemlicher newbie in sachen c*/
}

}

xOOn
07.05.2002, 14:21
#include <stdio.h>
#include <windows.h>
void main()

{

printf(&quot;Eine Taste zum Beenden des PCs bitte.&quot;);

if(getchar())
{

ExitWindowsEx(EWX_POWEROFF,0);
/*was muss ich hier jetzt einbauen? bin noch ein ziemlicher newbie in sachen c*/
}

}

-=]Monkey[]HeaD[=-
11.05.2002, 17:37
C:\windows\rundll.exe user.exe,exitwindowsexec

geht auch ganz gut.
Man kann sich zum Beispiel eine Verknüpfung erstellen und &quot;C:\windows\rundll.exe user.exe,exitwindowsexec&quot; als Befehlszeile eingeben, nun braucht man nuhr mer darauf doppelklicken und schon fährt der PC herunter.

mfg