-------------------------------------------------------------------------------------------------
@echo off
:: BatchGotAdmin (Run as Admin code starts)
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:: BatchGotAdmin (Run as Admin code ends)
:: Your codes should start from the following linepause
:Start
CLS
echo 選擇功能鍵執行
echo.
echo *******************************************************************************
echo 0.電腦管理 1.群組原則
echo 2.本機安全性設定 3.本機使用者和群組
echo 4.本機服務設置 5.測試網路卡組態
echo 6.對網路上的鄰居做測試 7.對網際網路連線做測試
echo 8.顯示目前主機之IP路由表 9.顯示主機本身TCP/IP環境
echo 10.顯示主機名稱 11.顯示IP位址與MAC的
echo 12.查詢主機的對應的網域名稱 13.顯示出電腦開放的所有埠
echo 14.顯示NetBIOS名稱列表 15.查看你機器的共用資源
echo 16.螢幕解析度 17.裝置管理員
echo 18.註冊表 19.事件檢視器
echo 20.檢查版本激活狀態 21.遠端桌面連接
echo 22.桌面圖示增修 23.使用者帳戶(自動登入)
echo 24.控制台 25.系統管理工具
echo 26.防火牆設定 27.網路連線
echo 28.新增查詢印表機 29.使用者帳戶控制(UAC)
echo 30.查詢網路卡實體位址 31.列出目前工作項目
echo 32.磁碟管理 33.工作管理員
echo 34.新增/移除程式 35.網際網路內容
echo 36.認證管理 37.電源管理
echo 38.系統內容 39.WINDOS安裝功能
echo 40.查詢電腦主機板CPU型號 41.顯卡的規格
echo 42.顯示硬碟的規格摘要 43.顯示記憶體規格摘要
echo 44.解除安裝或變更程式 45.顯示日期和時間
echo 46.電源選項 47.顯示地區及語言
echo 48.滑鼠內容 49.開啟網路和網際網路設定
echo 50.資源管理器 51.垃圾整理
echo 52.系統配置實用程序(msconfig) 53.計算機性能監測
echo 54.證書管理實用程序 55.屏幕鍵盤
echo 56.系統資訊 57.資料夾選項
echo 58.查看網卡 59.惡意軟體移除工具
echo 60.SHELL指令集 61.營幕保護裝置設定
echo.
echo OT 電腦登出
echo RS 電腦重開機 DW.電腦關機
echo 00.命令提示字元 99. 離開
echo *******************************************************************************
echo.
echo.
echo.
echo.
SET /P select= 請選擇:
IF NOT '%select%'=='' SET Choice=%select:~0,1%
echo.
IF /I '%select%'=='00' GOTO s00
IF /I '%select%'=='0' GOTO s0
IF /I '%select%'=='1' GOTO s1
IF /I '%select%'=='2' GOTO s2
IF /I '%select%'=='3' GOTO s3
IF /I '%select%'=='4' GOTO s4
IF /I '%select%'=='5' GOTO s5
IF /I '%select%'=='6' GOTO s6
IF /I '%select%'=='7' GOTO s7
IF /I '%select%'=='8' GOTO s8
IF /I '%select%'=='9' GOTO s9
IF /I '%select%'=='10' GOTO s10
IF /I '%select%'=='11' GOTO s11
IF /I '%select%'=='12' GOTO s12
IF /I '%select%'=='13' GOTO s13
IF /I '%select%'=='14' GOTO s14
IF /I '%select%'=='15' GOTO s15
IF /I '%select%'=='16' GOTO s16
IF /I '%select%'=='17' GOTO s17
IF /I '%select%'=='18' GOTO s18
IF /I '%select%'=='19' GOTO s19
IF /I '%select%'=='20' GOTO s20
IF /I '%select%'=='21' GOTO s21
IF /I '%select%'=='22' GOTO s22
IF /I '%select%'=='23' GOTO s23
IF /I '%select%'=='24' GOTO s24
IF /I '%select%'=='25' GOTO s25
IF /I '%select%'=='26' GOTO s26
IF /I '%select%'=='27' GOTO s27
IF /I '%select%'=='28' GOTO s28
IF /I '%select%'=='29' GOTO s29
IF /I '%select%'=='30' GOTO s30
IF /I '%select%'=='31' GOTO s31
IF /I '%select%'=='32' GOTO s32
IF /I '%select%'=='33' GOTO s33
IF /I '%select%'=='34' GOTO s34
IF /I '%select%'=='35' GOTO s35
IF /I '%select%'=='36' GOTO s36
IF /I '%select%'=='37' GOTO s37
IF /I '%select%'=='38' GOTO s38
IF /I '%select%'=='39' GOTO s39
IF /I '%select%'=='40' GOTO s40
IF /I '%select%'=='41' GOTO s41
IF /I '%select%'=='42' GOTO s42
IF /I '%select%'=='43' GOTO s43
IF /I '%select%'=='44' GOTO s44
IF /I '%select%'=='45' GOTO s45
IF /I '%select%'=='46' GOTO s46
IF /I '%select%'=='47' GOTO s47
IF /I '%select%'=='48' GOTO s48
IF /I '%select%'=='49' GOTO s49
IF /I '%select%'=='50' GOTO s50
IF /I '%select%'=='51' GOTO s51
IF /I '%select%'=='52' GOTO s52
IF /I '%select%'=='53' GOTO s53
IF /I '%select%'=='54' GOTO s54
IF /I '%select%'=='55' GOTO s55
IF /I '%select%'=='56' GOTO s56
IF /I '%select%'=='57' GOTO s57
IF /I '%select%'=='58' GOTO s58
IF /I '%select%'=='59' GOTO s59
IF /I '%select%'=='60' GOTO s60
IF /I '%select%'=='61' GOTO s61
IF /I '%select%'=='rs' GOTO srs
IF /I '%select%'=='dw' GOTO sdw
IF /I '%select%'=='ot' GOTO out
IF /I '%select%'=='99' GOTO end
echo "%select%" !! 選擇無效,請選擇:
echo.
GOTO Start
:s40
echo 顯示 CPU 規格摘要
wmic CPU list brief
wmic CPU list brief >> system_info.txt
echo 顯示 CPU 型號
wmic CPU get Name
wmic CPU get Name >> system_info.txt
echo 顯示 CPU 插槽類型
wmic CPU get SocketDesignation
wmic CPU get SocketDesignation >> system_info.txt
echo 顯示 CPU 核心數
wmic CPU get NumberOfCores
wmic CPU get NumberOfCores >> system_info.txt
echo 主機板型號
wmic baseboard get product,Manufacturer,version,serialnumber
wmic baseboard get product,Manufacturer,version,serialnumber >> system_info.txt