How to install WindowsNT Service (Batch Program) ~!


# NT Service ထဲကို install လုပ္တဲ့ပံုစံပါ။ Google မွာရွာၾကည့္ရင္ေတာ့ Visual Studio သံုးပီးေတာ့ Variable ထည့္တဲ့ဟာေတြ၊ .Net Framework သံုးတဲ့ဟာေတြပဲ ထြက္လာပါတယ္။

# ခက္တာက ကၽြန္ေတာ္က အရင္တုန္းက World Of Warcraft Server လုပ္ထားဖူးေတာ့ Apache, MySQL တို႕ကို Batch Program နဲ႕ Run တာ ျမင္ဖူးထားပါတယ္။ အဲဒီေတာ့ေထြေထြ ထူးထူး မရွာေတာ့ပဲ စက္မွာသြင္းထားတဲ့ XAMPP ဘက္ကို ဦးလွည့္လိုက္ပါတယ္။ အထဲ Directory ထဲကို ၀င္ၾကည့္ပီး နည္းနည္း နမူနာယူလိုက္တယ္ေပါ့။ ကၽြန္ေတာ္ထည့္တာကေတာ့ တျခား Service ပါ။ ဒါေပမဲ့ ပံုစံကို example အေနနဲ႕ Notes မွတ္ပါမယ္။ ေနာက္ျပန္ၾကည့္လို႕ရတာေပါ့။

# Install Service

@echo off
echo:
echo Batch Scripting By Hla Tun ( _________________ Co., Ltd ) ~~~!
echo:
if “%OS%” == “Windows_NT” goto WinNT

:WinNT
echo:
echo Installing Service On Baby Computer!
echo:
“path” –install servicename -c “config_path”
echo:
echo Finished!
echo:
:exit
pause

# Uninstall Service

@echo off
echo:
echo Batch Scripting By Hla Tun ( _______________ Co., Ltd ) ~~~!
echo:

if “%OS%” == “Windows_NT” goto WinNT

:WinNT
echo:
echo Time To Say Goodbye Service ….
echo:
“path” –uninstall servicename -c “config_path”
echo:
echo Successfully Remove ~!
echo:
:exit
pause

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s