@echo off
echo AppLife.Net
set /p name=请输您的微电脑名:
reg add
“HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName”
/v ComputerName /t reg_sz /d %name% /f >nul 2>nul
reg add
“HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters”
/v “NV Hostname” /t reg_sz /d %name% /f >nul 2>nul
reg add
“HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters”
/v Hostname /t reg_sz /d %name% /f >nul 2>nul
echo.
echo 改革Computer名达成
echo.
echo AppLife.Net
set /p work1=请输入您的行事组名:
wmic computersystem where Name=”%COMPUTERNAME%” call
JoinDomainOrWorkgroup Name=”%work1%”
echo 修改工作组完结
pause>nul
echo.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters

echo 修改IP
::查找MAC所对应的一而再一连名称
for /f “tokens=1,2,3,4,5,6 delims=-” %%A in (“%MAC%”) do set
MacWMIC=%%A:%%B:%%C:%%D:%%E:%%F
for /f “skip=2 tokens=2* delims==” %%A in (‘WMIC NIC WHERE
“MACAddress=’%MacWMIC%’ AND NetConnectionID!=NULL” GET NetConnectionID
/value’) do set “ConnName=%%A”
if not defined ConnName set ConnName=”本地连接”
netsh interface ip set address name=”%ConnName%” source=static addr=%IP%
mask=%mask%
netsh interface ip set address name=”%ConnName%” gateway=%gway%
gwmetric=0
netsh interface ip set dns name=”%ConnName%” source=static addr=%dns%
register=PRIMARY
netsh interface ip add dns name=”%ConnName%” addr=%dns2% index=2
netsh interface ip set wins name=”%ConnName%” source=static addr=none

@echo off
echo ———————————-
echo —-正在备份注册表 请稍后….—-
echo ———————————-
  reg export “HKEY_LOCAL_MACHINE” C:/reg_backup.reg
echo ———————-
echo —-注册表备份达成—-
echo ———————-
  ping 127.0.0.1 -n 3 >nul
echo ———————————–
echo —-安全布署正在改写 请稍候…—-
echo ———————————–
  @ping 127.0.0.1 -n 3 >nul
echo ———————-
echo —-正在禁止使用空连接—-
echo ———————-
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v
restrictanonymous /t reg_dword /d 1 /f
echo ————————–
echo —-禁止使用空连接装置已毕—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo ————————
echo —-正在删除暗中同意分享—-
echo ————————
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
/v AutoShareServer /t reg_dword /d 0 /f
echo —————————-
echo —-删除暗许分享设置甘休—-
echo —————————-
  @ping 127.0.0.1 -n 3 >nul
echo ——————————
echo —-正在改善TTL值请稍后…—-
echo ——————————
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v DefaultTTL /t reg_dword /d 53 /f
echo ——————-
echo —-TTL校勘达成—-
echo ——————-
  @ping 127.0.0.1 -n 3 >nul
echo ———————–
echo —-幸免syn山洪攻击—-
echo ———————–
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v SynAttackProtect /t reg_dword /d 2 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v EnablePMTUDiscovery /t reg_dword /d 0 /f
奥门威胁斯,  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v NoNameReleaseOnDemand /t reg_dword /d 1 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v EnableDeadGWDetect /t reg_dword /d 0 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v KeepAliveTime /t reg_dword /d 300000 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v PerformRouterDiscovery /t reg_dword /d 0 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v EnableICMPRedirects /t reg_dword /d 0 /f
echo ——————————-
echo —-防止syn受涝攻击设置甘休—-
echo ——————————-
  @ping 127.0.0.1 -n 3 >nul
echo ——————————
echo ——————————
echo —- 系统服务修正 —-
echo ——————————
echo ——————————
  @ping 127.0.0.1 -n 3 >nul
威尼斯人网上赌场,echo ——————–
echo —-修改3389端口—-
echo ——————–
  reg add
“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal
Server\Wds dpwd\Tds\tcp” /v PortNumber /t reg_dword /d 44454 /f
  reg add
“HKEY_LOCAL_MACHINE\SYSTEM\CurrentContro1Set\Control\Tenninal
Server\WinStations\RDP\Tcp” /v PortNumber /t reg_dword /d 44454 /f
echo ——————–
echo —-修改PORT完毕—-
echo ——————–
  @ping 127.0.0.1 -n 3 >nul
echo ————————————-
echo —-正在打开系统防火墙 请稍后….—-
echo ————————————-
  sc config sharedaccess start= auto & net start sharedaccess
echo ————————
echo —-系统防火墙已拉开—-
echo ————————
  @ping 127.0.0.1 -n 3 >nul
echo —————————-
echo —-正在关闭分享打字与印刷服务—-
echo —————————-
  @sc config Spooler start= disabled
  sc config LanmanServer start= disabled
  sc config LmHosts start= disabled
echo ————————–
echo —-已关门分享打字与印刷服务—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo —————————-
echo —-正在关闭远程帮忙服务—-
echo —————————-
  @sc config RDSessMgr start= disabled
echo ————————–
echo —-已关闭远程支持服务—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo ——————————
echo —-正在关闭远程注册表服务—-
echo ——————————
  @sc config RemoteRegistry start= disabled
echo —————————-
echo —-已关闭远程注册表服务—-
echo —————————-
  @ping 127.0.0.1 -n 3 >nul
echo —————————-
echo —-关闭自动硬件播放通告—-
echo —————————-
  sc config ShellHWDetection start= disabled
echo ———————–
echo —-自动播放公告关闭—
echo ———————–
  @ping 127.0.0.1 -n 3 >nul
echo —————————————-
echo —-正在关闭替换凭据下的运转进程服务—-
echo —————————————-
  sc config seclogon start= disabled
echo ————————–
echo —-已关闭运转进度服务—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo ————————————
echo —-IEEE 802.11 适配器的自发性配置—-
echo ————————————
  sc config WZCSVC start= disabled
echo ——————
echo —-已关闭IEEE—-
echo ——————
  @ping 127.0.0.1 -n 3 >nul
echo ————————–
echo —-客商端追踪服务关闭—-
echo ————————–
  sc config TrkSvr start= disabled
  sc config MSDTC start= disabled
echo —————————-
echo —-已关门客商端跟踪服务—-
echo —————————-
  @ping 127.0.0.1 -n 3 >nul
echo ——————–
echo —-扶植中央关闭—-
echo ——————–
  sc config helpsvc start= disabled
echo ————————–
echo —-已关门协理主题服务—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo ——————————–
echo ——————————–
echo —- 系统权限加固 —-
echo ——————————–
echo ——————————–
echo ——————————————————-
echo —-C盘(系统盘卡塔尔国 (administrators,system完全调节权限卡塔尔—-
echo ——————————————————-
  cacls C:\ /t /c /g administrators:F system:F
echo ——————————————-
echo —-Common Files (everyone顾客只读权限卡塔尔—-
echo ——————————————-
  Cacls “C:\Program Files\Common Files” /t /e /c /g everyone:R
echo ————————————————————-
echo —-IIS Temporary Compressed Files (everyone客商校勘权限卡塔尔(قطر‎—-
echo ————————————————————-
  Cacls “C:\WINDOWS\IIS Temporary Compressed Files” /t /e /c /g
everyone:C
echo ——————————————–
echo —-Microsoft.Net (everyone顾客只读权限卡塔尔(英语:State of Qatar)—-
echo ——————————————–
  Cacls C:\WINDOWS\Microsoft.Net /t /e /c /g everyone:R
echo ——————————————————
echo —-Temporary ASP.NET Files (everyone客商改正权限卡塔尔(英语:State of Qatar)—-
echo ——————————————————
  Cacls “C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files” /t /e /c /g everyone:C
echo ——————————————————
echo —-Temporary ASP.NET Files (everyone客户校正权限卡塔尔—-
echo ——————————————————
  Cacls “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files” /t /e /c /g everyone:C
echo ——————————————-
echo —-Registration (everyone客商读取权限卡塔尔(英语:State of Qatar)—-
echo ——————————————-
  Cacls C:\WINDOWS\Registration /t /e /c /g everyone:R
echo ———————————–
echo —-Temp (everyone顾客修正权限卡塔尔(قطر‎—-
echo ———————————–
  Cacls C:\WINDOWS\Temp /t /e /c /g everyone:C
echo ——————-

无需重启

net config server /SRVCOMMENT:”%describe%”
pause

echo 刷新注册表
if exist c:\winnt (secedit /refreshpolicy machine_policy /enforce)
else (gpupdate /force)

 @echo off
echo ———————————-
echo —-正在备份注册表 请稍后….—-
echo ———————————-
  reg export “HKEY_LOCAL_MACHINE” C:/reg_backup.reg
echo ———————-
echo —-注册表备份达成—-
echo ———————-
  ping 127.0.0.1 -n 3 >nul
echo ———————————–
echo —-安全铺排正在改写 请稍候…—-
echo ———————————–
  @ping 127.0.0.1 -n 3 >nul
echo ———————-
echo —-正在禁止使用空连接—-
echo ———————-
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v
restrictanonymous /t reg_dword /d 1 /f
echo ————————–
echo —-禁止使用空连接装置实现—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo ————————
echo —-正在删除暗许分享—-
echo ————————
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
/v AutoShareServer /t reg_dword /d 0 /f
echo —————————-
echo —-删除私下认可分享设置截止—-
echo —————————-
  @ping 127.0.0.1 -n 3 >nul
echo ——————————
echo —-正在修正TTL值请稍后…—-
echo ——————————
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v DefaultTTL /t reg_dword /d 53 /f
echo ——————-
echo —-TTL改正实现—-
echo ——————-
  @ping 127.0.0.1 -n 3 >nul
echo ———————–
echo —-幸免syn雨涝攻击—-
echo ———————–
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v SynAttackProtect /t reg_dword /d 2 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v EnablePMTUDiscovery /t reg_dword /d 0 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v NoNameReleaseOnDemand /t reg_dword /d 1 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v EnableDeadGWDetect /t reg_dword /d 0 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v KeepAliveTime /t reg_dword /d 300000 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v PerformRouterDiscovery /t reg_dword /d 0 /f
  reg add
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
/v EnableICMPRedirects /t reg_dword /d 0 /f
echo ——————————-
echo —-幸免syn受涝攻击设置甘休—-
echo ——————————-
  @ping 127.0.0.1 -n 3 >nul
echo ——————————
echo ——————————
echo —- 系统服务校勘 —-
echo ——————————
echo ——————————
  @ping 127.0.0.1 -n 3 >nul
echo ——————–
echo —-修改3389端口—-
echo ——————–
  reg add
“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal
Server\Wds dpwd\Tds\tcp” /v PortNumber /t reg_dword /d 44454 /f
  reg add
“HKEY_LOCAL_MACHINE\SYSTEM\CurrentContro1Set\Control\Tenninal
Server\WinStations\RDP\Tcp” /v PortNumber /t reg_dword /d 44454 /f
echo ——————–
echo —-修改PORT完毕—-
echo ——————–
  @ping 127.0.0.1 -n 3 >nul
echo ————————————-
echo —-正在打开系统防火墙 请稍后….—-
echo ————————————-
  sc config sharedaccess start= auto & net start sharedaccess
echo ————————
echo —-系统防火墙已张开—-
echo ————————
  @ping 127.0.0.1 -n 3 >nul
echo —————————-
echo —-正在关闭分享打字与印刷服务—-
echo —————————-
  @sc config Spooler start= disabled
  sc config LanmanServer start= disabled
  sc config LmHosts start= disabled
echo ————————–
echo —-已关门分享打字与印刷服务—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo —————————-
echo —-正在关闭远程支持服务—-
echo —————————-
  @sc config RDSessMgr start= disabled
echo ————————–
echo —-已关闭远程帮忙服务—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo ——————————
echo —-正在关闭远程注册表服务—-
echo ——————————
  @sc config RemoteRegistry start= disabled
echo —————————-
echo —-已关门远程注册表服务—-
echo —————————-
  @ping 127.0.0.1 -n 3 >nul
echo —————————-
echo —-关闭自动硬件播放文告—-
echo —————————-
  sc config ShellHWDetection start= disabled
echo ———————–
echo —-自动播放文告关闭—
echo ———————–
  @ping 127.0.0.1 -n 3 >nul
echo —————————————-
echo —-正在关闭替换凭据下的运行进度服务—-
echo —————————————-
  sc config seclogon start= disabled
echo ————————–
echo —-已关门运转进度服务—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo ————————————
echo —-IEEE 802.11 适配器的机关配置—-
echo ————————————
  sc config WZCSVC start= disabled
echo ——————
echo —-已关闭IEEE—-
echo ——————
  @ping 127.0.0.1 -n 3 >nul
echo ————————–
echo —-客商端追踪服务关闭—-
echo ————————–
  sc config TrkSvr start= disabled
  sc config MSDTC start= disabled
echo —————————-
echo —-已关门客商端追踪服务—-
echo —————————-
  @ping 127.0.0.1 -n 3 >nul
echo ——————–
echo —-支持中央关闭—-
echo ——————–
  sc config helpsvc start= disabled
echo ————————–
echo —-已关闭帮衬中心服务—-
echo ————————–
  @ping 127.0.0.1 -n 3 >nul
echo ——————————–
echo ——————————–
echo —- 系统权限加固 —-
echo ——————————–
echo ——————————–
echo ——————————————————-
echo —-C盘(系统盘卡塔尔国 (administrators,system完全调控权限卡塔尔—-
echo ——————————————————-
  cacls C:\ /t /c /g administrators:F system:F
echo ——————————————-
echo —-Common Files (everyone顾客只读权限卡塔尔—-
echo ——————————————-
  Cacls “C:\Program Files\Common Files” /t /e /c /g everyone:R
echo ————————————————————-
echo —-IIS Temporary Compressed Files (everyone顾客改过权限卡塔尔—-
echo ————————————————————-
  Cacls “C:\WINDOWS\IIS Temporary Compressed Files” /t /e /c /g
everyone:C
echo ——————————————–
echo —-Microsoft.Net (everyone顾客只读权限卡塔尔(英语:State of Qatar)—-
echo ——————————————–
  Cacls C:\WINDOWS\Microsoft.Net /t /e /c /g everyone:R
echo ——————————————————
echo —-Temporary ASP.NET Files (everyone客户改良权限卡塔尔—-
echo ——————————————————
  Cacls “C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files” /t /e /c /g everyone:C
echo ——————————————————
echo —-Temporary ASP.NET Files (everyone客户纠正权限卡塔尔国—-
echo ——————————————————
  Cacls “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files” /t /e /c /g everyone:C
echo ——————————————-
echo —-Registration (everyone客商读取权限卡塔尔(英语:State of Qatar)—-
echo ——————————————-
  Cacls C:\WINDOWS\Registration /t /e /c /g everyone:R
echo ———————————–
echo —-Temp (everyone客户纠正权限卡塔尔(قطر‎—-
echo ———————————–
  Cacls C:\WINDOWS\Temp /t /e /c /g everyone:C
echo ——————-
echo —-assembly (everyone客户读取权限卡塔尔—-
echo —————————————
  Cacls C:\WINDOWS\assembly /t /e /c /g everyone:R
echo ————————————-
echo —-WinSxS (everyone客商读取权限卡塔尔(قطر‎—-
echo ————————————-
  Cacls C:\WINDOWS\WinSxS /t /e /c /g everyone:R
echo ————————————
echo —-Fonts (everyone顾客读取权限卡塔尔(قطر‎—-
echo ————————————
  Cacls C:\WINDOWS\Fonts /t /e /c /g everyone:R
echo —————————————
echo —-System32 (everyone客户读取权限)—-
echo —————————————
  Cacls C:\WINDOWS\System32 /t /e /c /g everyone:R
echo ——————————————
echo —-msdtc (networkservice顾客纠正权限卡塔尔国—-
echo ——————————————
  Cacls C:\windows\system32\msdtc /t /e /c /g networkservice:C
echo —————————————————–
echo —-ASP Compiled Templates (everyone客户改良权限卡塔尔国—-
echo —————————————————–
  Cacls “C:\WINDOWS\system32\inetsrv\ASP Compiled Templates” /t /e
/c /g everyone:C
echo ————————————
echo —-*.exe (去除everyone客户权限卡塔尔—-
echo ————————————
  Cacls C:\WINDOWS\System32\*.exe /e /c /r everyone
echo ————————————
echo —-cmd.exe (去除system顾客权限卡塔尔(قطر‎—-
echo ————————————
  Cacls C:\WINDOWS\System32\cmd.exe /e /c /r system
echo ————————————
echo —-net.exe (去除system客户权限卡塔尔—-
echo ————————————
  Cacls C:\WINDOWS\System32 et.exe /e /c /r system
echo ————————————-
echo —-net1.exe (去除system客商权限卡塔尔国—-
echo ————————————-
  Cacls C:\WINDOWS\System32 et1.exe /e /c /r system
echo —————————————-
echo —-msdtc.exe (everyone顾客读取权限卡塔尔(قطر‎—-
echo —————————————-
  Cacls C:\WINDOWS\System32\msdtc.exe /e /c /g everyone:R
echo ——————————————
echo —-dllhost.exe (everyone顾客读取权限卡塔尔(قطر‎—-
echo ——————————————
  Cacls C:\WINDOWS\System32\dllhost.exe /e /c /g everyone:R
echo ——————————————
echo —-svchost.exe (everyone客商读取权限卡塔尔—-
echo ——————————————
  Cacls C:\WINDOWS\System32\svchost.exe /e /c /g everyone:R
echo ——————–
echo ——————–
echo —-系统加固完结—-
echo ——————–
echo ——————–
  @ping 127.0.0.1 -n 3 >nul
echo —————————–
echo —-安全设置完成 招待使用—-
echo —————————–
echo ——————
echo —-重启服务器—-
echo ——————
  @ping 127.0.0.1
  shutdown -r
  @pause

经过改造注册表修正主机名和专门的学业组

@echo off
echo AppLife.Net
set /p name=请输您的Computer名:
reg add
“HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName”
/v ComputerName /t reg_sz /d %name% /f >nul 2>nul
reg add
“HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters”
/v “NV Hostname” /t reg_sz /d %name% /f >nul 2>nul
reg add
“HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters”
/v Hostname /t reg_sz /d %name% /f >nul 2>nul
echo.
echo 改进Computer名完成
echo.
echo AppLife.Net
set /p work1=请输入您的行事组名:
wmic computersystem where Name=”%COMPUTERNAME%” call
JoinDomainOrWorkgroup Name=”%work1%”
echo 改免职业组实现
pause>nul
echo.

复制代码 代码如下:

将地方的代码保存为1.cmd或1.bat,双击运转下就可以。

 

复制代码 代码如下:

@echo off & code by m13632750052
for /f “tokens=12 delims= ” %%i in (‘ipconfig/all^|find “Physical
Address”‘) do set localmac=%%i
echo 通过MAC地址%localmac%追寻对应的机器名
for /f “skip=90 tokens=1,2,3,4 delims= ” %%i in (%~f0) do (
if [%%k]==[%localmac%] set Name=%%i
if [%%k]==[%localmac%] set IP=%%j
if [%%k]==[%localmac%] set MAC=%%k
if [%%k]==[%localmac%] set Workgroup=%%l
set mask=255.255.0.0
set gway=168.30.1.233
set dns=168.1.4.147
set dns2=168.1.6.243
)
echo 呈现查找结果 code by cn-dos breakme
if defined Name (echo %Name% %IP% %mac% %Workgroup%) else (goto
newset)
:Enterset
for /l %%i in (3,-1,0卡塔尔国 do ping -n 2 127.0.0.%%i>nul && @echo. %%i s
后校正机器名……

复制代码 代码如下:

Author

发表评论

电子邮件地址不会被公开。 必填项已用*标注