Friday, December 25, 2015

Window user account with bat program

0 comments

ေအာက္မွာက်ေတာ္Bat programပါေရးိေပးထားတယ္
တူနယ္ခ်င္းးးတို႔
ဆရာႀကီးတို႔လည္းကလိၾကည့္ခ္ခ္
run boxမွာnotepadလို႔ရိုက္ပီးအန္းတားေခါက္ပါ
ေအာက္ဆံုးက
codeေတြcopy လုပ္ပါ
ctrl+s
နိပါပါ
Filenameမွာ account creation.batလို႔ေရးပီးdesktopေပၚမွာsaveထားလိုက္ပါ
desktopေပၚက
creation.batမွာright clickေထာက္
run as administratorကိုကလစ္ိပီးrunေပးပါ
ပီးးမွ အဲ့ထဲကျပထားတဲ့စာေတြတိုင္းကလိၾကည့္
ဆရာႀကီးေတြကေတာ့ရီေတာ့မယ္ hak hak
ကၽြန္ေတာ္ cmd (command line) ကုိသံုးပီး computer user account တစ္ခုဖန္တီးျပပါ့မယ္
+++++++++++++++++++++++++++++++++++++++++++++++
အရင္ဆံးု My computer>C:(window တင္ထားတဲ့အပိုင္းျဖစ္ရပါမယ္)>windows>system32ထဲက cmd မွာ right clickေထာက္ပါ
run as administrator နဲrun ေပးပါ
အဲ့မွာ ကၽြန္ေတာ္တို႕ computer မွာ user account ဘယ္နွခုရွိလည္းျကည့္ပါ့မယ္
Net users
လို႕ရီုက္ပီးအန္းတားေခါက္ပါ
ဒါဆိုရွိတဲ့ယူစာအေကာင့္မ်ားက်လာပါလိမ့္မယ္
ယူစာအေကာင့္တစ္ခုေလာက္ဖန္တီးရေအာင္ အေကာင့္နာမ္မည္ကMTK ဆိုပါေတာ့ဗ်ာသူ႕တြက္password က password လို႔ပဲေပးလိုက္ပါမယ္
net user MTK password /add
ရိုက္ပီးအန္းတားေခါက္လို္က္ပါ
The command complete successfully.
လို႕ျပရင္create လုပ္ပီးသြားပါပီ
ဒါဆိုရင္ MTK ဆိုတဲ့နာမ္မည္ သူ႕တြက္passwordကpassword ပါပဲ
space ပါတဲ့နာမ္မည္ေပးခ်င္ရင္ "" ထဲမွာထည့္ေပးရပါတယ္ ဥပမာျကည့္ပါ
net user "IT Learner And Sharer" password /add
ဒါဆို၇င္ ကြန္ပ်ဴတာနာမ္မည္က IT Learner And Sharer ျဖစ္ျပီး password ကေတာ့ passwordျဖစ္ပါတယ္
အခုကၽြန္ေတာ္တို႕ဖန္တီးလိုက္တဲ့ user account က standard user အဆင့္ပဲရွိတာပါ
(standard user နဲ႕ သံုးတဲ့သူက software ေတြသြင္းတာျဖဳတ္တာလုပ္မရပါဘူးေနာ္ကထပ္လည္းပိတ္ပင္ထားတာေတြရွိပါေသးတယ္
အဲ့အလိုအကုန္လံုးကိုေပးလုပ္ခ်င္ရင္ administrator ကိုသတ္မွတ္ေပး၇မွာပါေအာက္မွာadministrator ေျပာင္းနည္းကိုဆက္ျကည့္ပါ )
IT Learner And Sharer ကို administrator ေျပာင္းျပပါ့မယ္
Net Localgroup administrator "IT Learner And Sharer" /add
ရိုက္ပီးအန္းတားေခါက္ပါ
the command complete successfully.
ျပရင္ administrator အဆင့္ကိုသတ္မွတ္ျပီးသြားပါပီ
standard user ျပန္ေျပာင္းခ်င္ရင္
Net Localgroup administrator "IT Learner And Sharer" /delete
လို႔ရိုက္ပီးအန္းတားေခါက္ပါ
ဒါဆိုရင္ standard user ျဖစ္သြားပါပီ
ယူစာအေကာင့္ကိုျဖတ္ခ်င္ရင္
Net user "IT Learner And Sharer" /delete
ရိုက္ပီးအန္းတားေခါက္ပါ
The command complete successfully. ျပရင္ အိုေကပါပီ
နားမလည္ရင္ျပန္ေမးနိုင္တယ္ေနာ္......တိုတိုမမညီညီဥဥေဒၚေဒၚတို႕ေရ
ဒီမွာေရးျပထားတာေတြကိုျကိုက္သလိုျပင္ေရးျပီးျကိုက္သလိုရွဲလုပ္နိုင္ပါတယ္ခင္ဗ်ာ
အားလံုးပဲအဆင္ေျပပါေစ
IT Learner And Sharer
@echo off
set username=username
set password=password
:yatsauktarlay
cls
echo.
echo.
color 0a
echo User Account Management program
echo *****************************
echo.
echo.
echo **IF you want to view all user account ,type "viewall" and press enter.
echo.
echo **IF you want to create user account ,type "create" and press enter.
echo.
echo **If you want to delete user account ,type "delete" and press enter.
echo.
echo.
echo.
echo IT Learner And Sharer (Yat Sauk Tar Lay)
:Machine
set /p yatsauktar=Type you want:
if %yatsauktar%==viewall goto :A
if %yatsauktar%==create goto B:
if %yatsauktar%==delete goto :chitlay
else
msg * Please type above keyword.(Yat Sauk Tar Lay)
cls
goto :yatsauktarlay
:chitlay
color 0d
cls
@echo off
echo.
echo.
echo **If you want to exit this program, type "exit "and press enter.
echo.
echo.
set /p mtk=**Type You Want to delete User Account Name:
Net user %mtk% /delete
if %mtk%==exit goto exit
cls
goto :yatsauktarlay
:A
cls
color 0e
net users
pause
cls
goto :yatsauktarlay
:B
cls
color 0B
echo.
echo.
echo Creation Account
echo **************
echo.
echo.
echo **If you want to set user name ,type "createaccount" and press enter.
echo.
echo.
echo **If you want to Change "Administrator user",type "createadministrator" and press enter.
echo.
echo.
echo **IF you want to change "Standard User",type "createstandard" and press enter.
echo.
echo.
echo **If you want to go Home ,type "home" and press enter .
echo.
echo.
echo ** IF you want to exit this program ,type "exit" and press enter .
:abcdefg
set /p yatsauktarlay=Type you want:
if %yatsauktarlay%==createaccount goto :C
if %yatsauktarlay%==createadministrator goto :E
if %yatsauktarlay%==createstandard goto :F
if %yatsauktarlay%==home goto :yatsauktarlay
if %yatsauktarlay%==exit exit
else goto :mtk
:mtk
cls
msg * Invalid!!!Please type valid key!(Yat Sauk Tar Lay)
goto :B
:C
set /p username=Enter User Name:
set /p password=Enter Password:
net user %username% %password% /add
msg * Done!! username=%username% password=%password%
start http://yatsauktarlay1996.blogspot.com/
goto :B
pause
:E
color 0c
set /p administrator=Enter Username :
Net Localgroup administrator %administrator% /add
cls
goto :B
:F
color 0c
set /p standard=Enter Username:
net localgroup administrator %standard% /add
cls
goto :B