am Files\HeidiSQL\heidisql.exe >> MysqlTool.url
文件內容如下:
[InternetShortcut] URL=C:\Program Files\HeidiSQL\heidisql.exe IconIndex=0 IconFile=C:\Program Files\HeidiSQL\heidisql.exe
然後把創建的快捷方式文件“Mysql Tool”,放在如下的目錄下(win2003)
C:\Documents and Settings\Default User\桌面\
或者直接創建快捷方式
echo [InternetShortcut] >> "C:\Documents and Settings\Default User\桌面\MysqlTool.url" echo URL=C:\Program Files\HeidiSQL\heidisql.exe >> "C:\Documents and Settings\Default User\桌面\MysqlTool.url" echo IconIndex=0 >> "C:\Documents and Settings\Default User\桌面\MysqlTool.url" echo IconFile=C:\Program Files\HeidiSQL\heidisql.exe >> "C:\Documents and Settings\Default User\桌面\MysqlTool.url"
然後編寫創建用戶腳本adduser.bat, 內容如下
@echo off set /p username=輸入添加的用戶名: set /p isuserdel=如果用戶存在,是否刪除用戶Y/N: echo %username% net user %username% >nul 2>nul if "%errorlevel%" == "0" ( echo 存在該用戶 if "%isuserdel%" == "Y" ( net user %username% /del echo 用戶 "%username% 已經刪除" ) ) else ( echo 用戶不存在,正在創建.... net user %username% 111111 /add net localgroup "Remote Desktop Users" %username% /add echo 用戶已經成功創建 ) echo 按任意鍵退出 pause & exit
---end---