winxp shutdown msg + abort (autoit?)

07/02/2008 10:03 Mizu#1
Hey, i´m searching for some hints to solve the following problem:
Everytime i click on start -> Shutdown, the shutdown progress should abort and a message like "bla bla do you rly rly ryl want to shutdown ?" should appear.


Is there any way to use Autoit like p.e.:
$start_button_coordinates = 534,234,234,234
function = "abbort shutdown and popup the meassage"
onclick($start_button_coordinates,function)

thanks in advance
07/02/2008 11:58 wadimwadim#2
Dont know how to use this with au3 and dont know if its possible... , but u can try with a mousehook and a special region of shutdownbutton
07/02/2008 18:31 Azunai#3
simply write a script which asks for it name it shutdown.exe
and rename the original one to shutdown_orig.exe

and then place your script @windows dir ;)

e.g.

Code:
$return = msgbox(4,"Shutdown","Do you realy want to shut down Your system?")
if $return = 6 then run(@windowsdir&"\system32\shutdown_orig.exe -s")
exit
should work @ xp
sometimes windows deletes your script and replaces it with the original shutdown.exe

in this case u have to rename all shutdown.exe in the whole windows dir (system32 & dllcache and so on)

maybe this helps u ;)

bzw i hate english xD
07/03/2008 11:56 Mizu#4
shutdown.exe will be replaced at every startup, so nogo ^^
i disabled the shutdown via regestry and wrot a little shutdown script myself so this prob is solved ^^

PHP Code:
#include <GUIConstantsEx.au3>

Opt('MustDeclareVars'1)

Feierabend()

Func Feierabend()
    
Local , , , , , 
    
GUICreate("Feierabend",320,100

    
Opt("GUICoordMode"2)
     = 
GUICtrlCreateButton("Herunterfahren"1030100)
     = 
GUICtrlCreateButton("Abmelden"0, -1)
     = 
GUICtrlCreateButton("Neustart"0, -1)
     = 
GUICtrlCreateButton("Abbrechen", -100, +2)
     = 
GUICtrlCreateButton("mTime starten", -300, -1)
    
GUISetState()   
     
MsgBox(0'mTime''mTime eingetragen?'


    While 
1
         
GUIGetMsg()
        
Select
            
Case  = 
                
ExitLoop
            
Case  = 
                
Run('shutdown.exe -s -f')    
            Case  = 
                
Run('shutdown.exe -l')      
            Case  = 
                
Run('shutdown.exe -r -t 00')         
            Case  = 
                Exit 
1
            
Case  = 
                
Run('mtime/Mtime2008Desktop_Client.exe')
                Exit 
1
        EndSelect
    WEnd
EndFunc 
07/03/2008 12:06 wadimwadim#5
wozu brauchst du das eigentlich?
07/03/2008 15:36 Azunai#6
wtf da is er deutsch xD
07/07/2008 13:07 Mizu#7
Quote:
Originally Posted by wadimwadim View Post
wozu brauchst du das eigentlich?
Weils mein cheffe so will ^^