Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remote Shutdown Using Batch File
20-02-2010, 04:02 PM,
Post: #1
Remote Shutdown Using Batch File
ni ada simple batch file utk buat shutdown timer..simpan dlam file .bat or .cmd

selamat mencuba...

Code:
cd /d %windir%\system32
@echo off
:begin
set kompem=
color 4f
cls
Title AUTO SHUTDOWN by Myecho
echo.
set/p "time_h=Time in Hour=>"
set/p "time_m=Time in minute=>"
set/p "msg=Mesage=>"
set/a "Total_m=%time_m%*60"
set/a "Total_h=%time_h%*60*60"
set/a "Total=%Total_m%+%Total_h%"
echo.
echo Your computer will be shutdown in %time_h% HOUR %time_m% MINUTE,Are you sure?
echo.
echo press Enter to continue, Others to Decline?
echo.
set /p "kompem=Comfirm=>"
if not "%kompem%"=="" goto begin
shutdown -s -t %Total% -c "%msg%"
exit

rem : note ==>
rem : klu nak restart –> shutdown -R -t %Total% -c “%msg%”
rem : klu nak logoff –> shutdown -l -t %Total% -c “%msg%”
rem : Klu nak cancel shutdown type shutdown -a kat start–>run
Reply
20-02-2010, 04:38 PM,
Post: #2
RE: Remote Shutdown Using Batch File
nice broBig Grin berguna nie
Reply
14-11-2010, 09:39 PM, (This post was last modified: 14-11-2010, 10:19 PM by myecho.)
Post: #3
RE: Remote Shutdown Using Batch File
Welcome, coding tu i dah tukar kepada application, nak try boleh download dekat sini -> www.mediamu.com/download/auto_shutdown.exe

Compatible with: Windows 9x/XP/Vista/7

[Image: as1.png]

[Image: as2.png]

Source Code dia seperti dibwah (Autohotkey language), klu ada idea nak upgrade boleh la share kat sini yer..sharing is caring, hav fun...Smile

Code:
; <COMPILER: v1.0.47.6>
;
; Language:       English
; Platform:       Win9x/NT/Vista/7
; Author:         Amin <advancods@yahoo.co.uk>
; Website:        http://www.mediamu.com
;
; The Software is provided to you free of charge. Should you accept the terms of this agreement, BY DOWNLOADING, INSTALLING, USING, TRANSMITTING, DISTRIBUTING OR COPYING THIS SOFTWARE ("THE SOFTWARE"), YOU AGREE TO THE TERMS OF THIS AGREEMENT (INCLUDING THE SOFTWARE LICENCE AND DISCLAIMER OF WARRANTY) WITH VIRTUALOBJECTIVES THE OWNER OF ALL RIGHTS IN RESPECT OF THE SOFTWARE. Any product or brand names mentioned in the software and associated manuals and files are trademarks or registered trademarks of their respective owners. Have fun...


#SingleInstance off
Gui, Add, Tab, x-4 y0 w660 h500 , Menu|About
Gui, Font, S15 Cred Bold, Verdana
Gui, Add, Text, x66 y30 w360 h30 , <<<--- Auto shutdown --->>>
Gui, Font, S10 Cdefault, Verdana
Gui, Add, Text, x6 y90 w120 h20 , Time in hour     :
Gui, Add, Text, x6 y120 w120 h20 , Time in minute :
Gui, Add, Text, x6 y150 w120 h20 , Your Message  :
Gui, Add, Edit, x126 y90 w40 h20 vtime_in_hour, 0
Gui, Add, Edit, x126 y120 w40 h20 vtime_in_minute, 0
Gui, Add, Text, x316 y90 w150 h20 , What u want to do :
Gui, Font, S10 Cblue, Verdana
Gui, Add, Radio, x316 y120 w140 h20 vshutdown, Shutdown
Gui, Add, Radio, x316 y150 w140 h20 vrestart, Restart
Gui, Add, Radio, x316 y180 w140 h20 vlogoff, Log Off
Gui, Add, Radio, x316 y210 w140 h20 valarm, Alarm
Gui, Add, Button, x6 y270 w280 h40 , Start
Gui, Tab, About
Gui, Add, Text, x165 y70 w140 h20 ,  Designed by Amin
Gui, Tab, About
Gui, Font, ,
Gui, Add, Text, x168 y90 w140 h40 ,  advancods@yahoo.co.uk     <   www.mediamu.com   >
Gui, Tab, About
Gui, Add, Text, x176 y190 w90 h20 , ->Auto shutdwon
Gui, Add, Text, x176 y220 w70 h20 , ->Auto restart
Gui, Add, Text, x176 y250 w80 h20 , ->Auto Log Off
Gui, Add, Text, x176 y280 w120 h20 , ->Alarm
Gui, Tab, Menu
Gui, Font, ,
Gui, Add, Edit, x6 y180 w280 h80 vmsg, ur msg...
Gui, Add, Text, x6 y370 w380 h20 , To make sure the program run cordially`, check ur remote shutdown here  --->
Gui, Add, Button, x386 y370 w60 h20 , Check
Gui, Tab, About
Gui, Font, S10 CDefault Bold, Verdana
Gui, Add, Text, x166 y160 w120 h20 , Programed for :
Gui, Tab, Menu
Gui, Font, S8 Cred, Verdana
Gui, Font, S8 Cred, Verdana
Gui, Add, Button, x316 y240 w130 h30 , Cancel all task
Gui, Add, Button, x316 y280 w130 h30 , Cancel Shutdown
Gui, Tab, About
Gui, Font, S15 CDefault Bold, Verdana
Gui, Font, S15 Cred Bold, Verdana
Gui, Add, Text, x116 y40 w240 h30 , Auto Shutdown V1.2
main:
Gui, Tab, Menu
Gui, Font, S8 Cgreen, Verdana
Gui, Add, Text, x166 y60 w150 h20 , Programed by Amin
Gui, Tab, About
Gui, Font, ,
Gui, Tab, About
Gui, Font, S15 Cgreen Bold, Verdana
Gui, Add, Text, x6 y115 w150 h30 , _____________________
Gui, Font, S15 Cyellow Bold, Verdana
Gui, Add, Text, x156 y115 w140 h30 , ____________________________--
Gui, Font, S15 Cred Bold, Verdana
Gui, Tab, About
Gui, Font, ,
Gui, Add, Text, x10 y330 w460 h20 ,  <<<<<<<<<<<<<<<<<<<< This sofware is Copyright under Advancorp.inc >>>>>>>>>>>>>>>>>>>
Gui, Tab, About
Gui, Font, S15 Cred Bold, Verdana
Gui, Add, Text, x296 y115 w160 h30 , ______________________
Gui, Tab, Menu
Gui, Font, S8 CDefault, Verdana
Gui, Font, ,
Gui, Add, Edit, x116 y340 w270 h20 ringtone, Beep once (default)
Gui, Add, Button, x386 y340 w60 h20 gBrowse, Browse
Gui, Font, S15 Cred Bold,
Gui, Tab, Menu
Gui, Font, S8 CDefault, Verdana
Gui, Add, Text, x6 y340 w110 h20 , Alarm Ringtone :
Gui, Tab, Menu

Gui, Show, x131 y91 h410 w493, Auto Shutdown V1.2..by Amin
Return


filedelete,%tmp%\discon.bat

ButtonCheck:
Gui, submit
IfExist, %windir%\system32\dllcache\shutdown.exe
msgbox,,Info,your computer have a remote shutdown
else
{
MsgBox, 4,Confirm, your computer dont have a remote shutdown,do u want to download it
IfMsgBox Yes
   goto,download
else
    goto,main
}
goto,main

download:
msgbox,,wait,please wait download being process...
URLDownloadToFile,http://h1.ripway.com/myecho/shutdown.exe  ,%windir%\system32\dllcache\shutdown.exe
IfExist, %windir%\system32\dllcache\shutdown.exe
msgbox,,Done,Download done,to make sure the download is complate, plz clik check button again
goto,main


Browse:
FileSelectFile, SelectedFile, 3, , Select your alarm ringtone, (*.wav; *.mp3)
if SelectedFile =
{
   spath=
}
else
{
  Spath = %SelectedFile%
  GuiControl,,Edit4,%Spath%
}
return


ButtonCancelalltask:
Gui, submit
MsgBox, 4,Confirm, Are you sure want to cancel all task in proress?
IfMsgBox Yes
    goto,kill_task
else
    goto,main

kill_task:
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
Process, close ,%A_ScriptName%
msgbox,,finish,all task was delete %A_LoopFilename%
goto,main

ButtonCancelshutdown:
filedelete,%tmp%\discon.bat
Fileappend,
(
@echo off
shutdown -a
),%tmp%\discon.bat
run,%tmp%\discon.bat
goto,main


Buttonstart:
Gui, submit
filedelete,%tmp%\discon.bat


time_m=60000
time_m*=%time_in_minute%



time_h=3600000
time_h*=%time_in_hour%


total_time:=(time_m+time_h)

ifEqual,shutdown,1
goto,check
ifEqual,restart,1
goto,check
ifEqual,logoff,1
goto,check
ifEqual,alarm,1
goto,check
else
msgbox,48,problem,please choose what do you want to do?
goto,main


check:
if total_time >= 60000
{
goto,big_then_1m
}
else
goto,low_then_1m


big_then_1m:

ifEqual,shutdown,1
goto,shutdown
ifEqual,restart,1
goto,restart
ifEqual,logoff,1
goto,logoff
ifEqual,alarm,1
goto,alarm
else
msgbox,48,problem,please choose what do you want to do?
return

shutdown:
{
MsgBox, 4,Confirm, your computer will be shutdown in %time_in_hour% hour %time_in_minute% minutes, Would you like to continue?
IfMsgBox Yes
    goto,syes
else
    goto,sno
return

syes:
total_time_bef_1min:= (total_time-60000)
sleep,%total_time_bef_1min%
Fileappend,
(
@echo off
shutdown -s -f -t 60 -c "%msg%"
),%tmp%\discon.bat
run,%tmp%\discon.bat
Process, close ,YahooMessenger.exe
exitapp

sno:
goto,main
}


restart:
{
MsgBox, 4,Confirm, your computer will be Restart in %time_in_hour% hour %time_in_minute% minutes, Would you like to continue?
IfMsgBox Yes
    goto,syes2
else
    goto,sno2
return

syes2:
total_time_bef_1min:= (total_time-60000)
sleep,%total_time_bef_1min%
Fileappend,
(
@echo off
shutdown -r -f -t 60 -c "%msg%"
),%tmp%\discon.bat
run,%tmp%\discon.bat
Process, close ,YahooMessenger.exe
exitapp

sno2:
goto,main
}


logoff:
{
MsgBox, 4,Confirm, your computer will be Log Off in %time_in_hour% hour %time_in_minute% minutes, Would you like to continue?
IfMsgBox Yes
    goto,syes3
else
    goto,sno3
return

syes3:
total_time_bef_1min:= (total_time-60000)
sleep,%total_time_bef_1min%
Fileappend,
(
@echo off
shutdown -l -f -t 60 -c "%msg%"
),%tmp%\discon.bat
run,%tmp%\discon.bat
Process, close ,YahooMessenger.exe
exitapp

sno3:
goto,main
}


alarm:
{
MsgBox, 4,Confirm, Message  "%msg%"  will be apear in %time_in_hour% hour %time_in_minute% minutes, Would you like to continue?
IfMsgBox Yes
    goto,syes4
else
    goto,sno4
return

syes4:
total_time_bef_1min:= (total_time)
sleep,%total_time_bef_1min%
if spath=
SoundBeep, 750, 1000
else
soundplay,%spath%
msgbox,48,message for you,%msg%
exitapp

sno4:
goto,main
}


low_then_1m:
ifEqual,shutdown,1
goto,shutdown2
ifEqual,restart,1
goto,restart2
ifEqual,logoff,1
goto,logoff2
ifEqual,alarm,1
goto,alarm2
else
msgbox,48,problem,please choose what do you want to do?
return


shutdown2:
{
Fileappend,
(
@echo off
shutdown -s -f -t 0 -c "%msg%"
),%tmp%\discon.bat
run,%tmp%\discon.bat
Process, close ,YahooMessenger.exe
exitapp

}


restart2:
{
Fileappend,
(
@echo off
shutdown -r -f -t 0 -c "%msg%"
),%tmp%\discon.bat
run,%tmp%\discon.bat
Process, close ,YahooMessenger.exe
exitapp
}


logoff2:

{
Fileappend,
(
@echo off
shutdown -l -f -t 0 -c "%msg%"
),%tmp%\discon.bat
run,%tmp%\discon.bat
Process, close ,YahooMessenger.exe
exitapp
}

alarm2:
if spath =
SoundBeep, 750, 1000
else
soundplay,%spath%
msgbox,48,message for you,%msg%
GuiClose:
ExitApp
Reply
25-12-2010, 07:05 AM,
Post: #4
RE: Remote Shutdown Using Batch File
software x di lengkapi dngan betul ?
Reply
25-12-2010, 11:11 AM,
Post: #5
RE: Remote Shutdown Using Batch File
(20-02-2010, 04:02 PM)myecho Wrote: ni ada simple batch file utk buat shutdown timer..simpan dlam file .bat or .cmd

selamat mencuba...

Code:
cd /d %windir%\system32
@echo off
:begin
set kompem=
color 4f
cls
Title AUTO SHUTDOWN by Myecho
echo.
set/p "time_h=Time in Hour=>"
set/p "time_m=Time in minute=>"
set/p "msg=Mesage=>"
set/a "Total_m=%time_m%*60"
set/a "Total_h=%time_h%*60*60"
set/a "Total=%Total_m%+%Total_h%"
echo.
echo Your computer will be shutdown in %time_h% HOUR %time_m% MINUTE,Are you sure?
echo.
echo press Enter to continue, Others to Decline?
echo.
set /p "kompem=Comfirm=>"
if not "%kompem%"=="" goto begin
shutdown -s -t %Total% -c "%msg%"
exit

rem : note ==>
rem : klu nak restart –> shutdown -R -t %Total% -c “%msg%”
rem : klu nak logoff –> shutdown -l -t %Total% -c “%msg%”
rem : Klu nak cancel shutdown type shutdown -a kat start–>run

cam na nak code tu..ke appliction..gune software pe..tolong ajar kn aku..!!
PHP Code:
Get a Free Hosting Domain at " http://tny.cz/bcc10d6c " 

Reply
25-12-2010, 11:28 AM,
Post: #6
RE: Remote Shutdown Using Batch File
rasanya sekang ni semuanya dah disablekan remote assist remote desktop, remote blah2.. kalau kat pc tu dah disablekan sebarang remote camana? Big Grin
Reply
25-12-2010, 11:42 AM,
Post: #7
RE: Remote Shutdown Using Batch File
Aku tak nampak kaitannya dengan "Remote" pada script di atas.
̿ ̿ ̿̿'̿̿\̵͇̿̿\=(•̪●)=/̵͇̿̿/'̿̿ ̿ ̿ ̿ - انا کڤيتݢولوڠ
http://fatah.afraid.org/
[Image: 763440762.png]
Reply
25-12-2010, 11:50 AM,
Post: #8
RE: Remote Shutdown Using Batch File
(25-12-2010, 11:42 AM)kapitgulung Wrote: Aku tak nampak kaitannya dengan "Remote" pada script di atas.

GayFace lol..
betul la bro..aku ingatkan remote shutdown tadi..tertipu aku dgn tajuknya..ROFL

Code:
shutdown –m \\computername –r –f

nk gui leh guna ni je..
shutdown -i
Reply
25-12-2010, 12:12 PM, (This post was last modified: 25-12-2010, 12:21 PM by heiswayi.)
Post: #9
RE: Remote Shutdown Using Batch File
(25-12-2010, 11:28 AM)sil Wrote: rasanya sekang ni semuanya dah disablekan remote assist remote desktop, remote blah2.. kalau kat pc tu dah disablekan sebarang remote camana? Big Grin

btul2 kbnyakan dh disable smua..
tp klo utk kgunaan network sendiri.. atau owned sbg admin.. boleh la.. haha

atau psg backdoor je..hehe
Reply
25-12-2010, 01:25 PM, (This post was last modified: 25-12-2010, 01:29 PM by myecho.)
Post: #10
RE: Remote Shutdown Using Batch File
Sorry bro2 semua, tersilap tajuk plk, rasanya tajuk yg sesuai "Create application to shutdown/restart/logoff your PC", sy budak baru belajar..huhu

emm klu shutdown.exe xleh pki boleh guna script vbs ni kat coding , lebih efficient kot, then run as discon.vbs

Code:
strComputer = "." ' Local Computer
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}\\" & _
                strComputer & "\root\cimv2")

Set colOs = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")

For Each objOs in colOs
    objOs.Win32Shutdown(5)
Next

*note:
win32 shutdown tu, dalam kurungan tu boleh ubah value untuk set shutdown parameter.
0 = logoff
0+4 = logoff(force)
1 = Shutdown biasa
1+4 = shutdown(force)
2 = restart komputer
2+4 = restart(force)
Reply
25-12-2010, 10:16 PM,
Post: #11
RE: Remote Shutdown Using Batch File
shutdown -s -t 1000

^_^
Saya Bercita - Cita Untuk Menjadi Hacker Supaya Dapat Membantu Orang Lain Daripada Serangan Hacker Jahat Drunk

Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Wink cara buat batch file(shortcut open program) fikisibes 5 971 22-07-2012, 08:20 PM
Last Post: paley
  weevely.py backdoor connector (remote) r3v3r7 9 2,336 27-02-2011, 12:23 PM
Last Post: fatah
  Warbiest Batch Commands MieXoX 20 3,474 03-09-2009, 07:56 PM
Last Post: Stynx

Forum Jump: