Post မ်ားကုိရွာရန္

Thursday, July 4, 2013

ကြန္ပ်ဴတာကိုဆန္းဆန္းေလးပိတ္မယ္

ကြန္ပ်ဴတာကိုဆန္းဆန္းေလးပိတ္မယ္
ကြန္ပ်ဴတာကုိဆန္းဆန္းေလပတ္ခ်င္သူမ်ားအတြက္တင္ေပးလုိက္ပါတယ္။Window ကုိနိပ္စာမလုိပဲနဲFile ေလးတစ္ခုနဲ R/S လုပ္လုိရတဲFlie ေလးပါ။
 သိျပီးသား လူေတြလည္း ေပါပါလိမ္႔မယ္ .... ဒါေပမယ္႔ ဆန္းဆန္းေလး
လုပ္ၾကည္႔ရေAာင္ေပါ႔ .... ေAာက္က bold letter နဲ႔ေရးထားတဲ႔ command ေလးေတြကိုကူးျပီး file
extension ကို .bat န႔ဲ မွတ္လိုက္ပါ ... ျပီးရင္ run ျပီး Yes / No ေပးျပီး shutdown ဒါမွ မဟုတ္
restart ကို ဆန္းဆန္းေလး ခ်ၾကည္႔ရတာေပါ႔ .....
@echo off
cls
echo Do you want to SHUT DOWN or RESTART your
computer?? (Y / N)
set/p "cho=>"
if %cho%== Y goto Chose
if %cho%== y goto Chose
if %cho%==N goto End
if %cho%==n goto End
echo Inviled choice
:Chose
cls
echo Shutdown (S) or Restart (R) !!!!!
echo Press ( S / R )
set/p "cho=>"
if %cho%== S goto Shut
if %cho%== s goto Shut
if %cho%==R goto Rs
if %cho%==r goto Rs
echo Invalid choice.
:Shut
cls
echo Are you sure want to shut down your
computer??(Y/N)
set/p "cho=>"
if %cho%==Y goto Shutdown
if %cho%==y goto Shutdown
if %cho%==N goto End
if %cho%==n goto End
echo Invalid choice.
:Shutdown
shutdown -s -t 0000
goto End
:Rs
cls
echo Are you sure want to restart your
computer??(Y/N)
set/p "cho=>"
if %cho%==Y goto Restart
if %cho%==y goto Restart
if %cho%==N goto End
if %cho%==n goto End
echo Invalid choice.
:Restart
shutdown -r -t 0000
goto End
:End

No comments:

Post a Comment