Friday, December 8, 2017

අපිම Shutdown,Restart,Hibernate බටන් හදාගමු.




මේක batch file වලින් හදන්නේ. මේ  ටික වැඩකරන්නේ Windows 7,8,10 වලට XP වලට නම් shutdown.exe -s -t 00 දාන්න ඕන. මේක .bat file format වලින්  .exe file format  එක්ක කරන හැටි මන් කලින් ලිපියක දැන්ම bat programme එකක් exe file එකක් කරගන්න හැටි. exe කරනවනම් අපිට කැමති icon එකක් දාගන්න පුලුවන්.

අදාල  Button එකට අදාල code එක notpad එකකට copy කරගන්න. save as
ගිහින් කැමති නමක් දාලා .bat  file format එකෙන් save කරන්න (save as type එක All files දෙන්න )
මටනම් මේක හදාගද්දි ජොලියට හැදුවේ ඒත් ගොඩක් ප්‍රයෝජනවත් වුනා මොකද ඩෙස්ක්ටොප් එකේ තිබුන නිසා pc එක හිරවෙලා touch pad වැඩ නැති වුනාම keyboard එකෙන් button එක enter කලාම.......

Shutdown Button 

@echo off
title Shutdown Button
color c
echo ............. Your Pc Will Shutdown .............
ping localhost -n 3 >nul
ping localhost -n 3 >nul
shutdown.exe /s /t 00

Restart Button

@echo off
title Restart Button
color c
echo ............. Your Pc Will Restart .............
ping localhost -n 3 >nul
ping localhost -n 3 >nul
shutdown.exe /r /t 00

Hibernate Button

@echo off
title Hibernate Button
color c
echo ............. Your Pc Will Hibernate .............
ping localhost -n 3 >nul
ping localhost -n 3 >nul
shutdown.exe /h
pramesh ekanayake Web Developer

Follow

No comments:

Post a Comment