install.cmd
来自「这是一个可以在NT/2000环境下读写各种端口、终端源数据的库。无需自己编写系统」· CMD 代码 · 共 52 行
CMD
52 行
@echo off
echo NTPORT Service installation
if %1. == . goto help
echo Test %1 ...
net view %1 >nul
if errorlevel 1 goto NoAnswer
echo Delete zntport
sc.exe \\%1 Stop zntport>NUL
sleep 2
sc.exe \\%1 delete zntport>NUL
sleep 2
copy /B Redist\zntport.sys \\%1\ADMIN$\SYSTEM32\drivers\zntport.sys
rem cacls \\%1\admin$\system32\zntport.sys /E /R Jeder
cacls \\%1\admin$\system32\drivers\zntport.sys /E /R EveryOne
copy /B Redist\ntport.dll \\%1\ADMIN$\SYSTEM32\ntport.dll
rem cacls \\%1\admin$\system32\ntport.dll /E /R Jeder
cacls \\%1\admin$\system32\ntport.dll /E /R EveryOne
sc \\%1 Create zntport BinPath= %%SystemRoot%%\System32\drivers\zntport.sys DisplayName= "NTPort Library Driver" type= kernel start= auto error= ignore
sc \\%1 Start zntport
goto end
:help
echo %0 Computername
echo.
echo Need Admin$-Share and NTPORT for installation.
goto end
:NoAnswer
echo.
echo ************************************************************************
echo Can't connect to %1.
echo ************************************************************************
echo.
pause
goto end
:end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?