Skip to content

Commit

Permalink
更新获取win10的CMD批处理管理员权限;添加避免CMD窗口显示中文乱码;
Browse files Browse the repository at this point in the history
  • Loading branch information
jokky1412 committed May 22, 2024
1 parent 3bb45cb commit eda8f81
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 设置IP地址0617.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ title
@echo off
setlocal enabledelayedexpansion
color 71
rem CMD窗口显示中文乱码
chcp 65001 > nul

rem WIN10系统CMD获取管理员权限
%1 start "" mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c ""%~s0"" ::","","runas",1)(window.close)&&exit
%1 start "" mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c pushd ""%~dp0"" && ""%~s0"" ::","","runas",1)(window.close)&&exit


set NAME="本地连接 2"
set "MASK=255.255.255.0"
Expand Down

0 comments on commit eda8f81

Please # to comment.