|
也是以前Win7时代写的批,可以删除一部分使用,供参考:
- [url=home.php?mod=space&uid=336905]@echo[/url] off
- set segment=38
- rem 上面这句的segment=后面请输入你的网段,注意前后不要有空格,网址会变成:192.168.你的网段.坐位号+100
- rem 系统黙认的服务器IP为192.168.你的网段.5、子网掩码:255.255.224.0 网关:192.168.32.1 DNS:211.137.96.205
- setlocal enabledelayedexpansion
- regsvr32 /s scrrun.dll
- echo 去掉集成显卡右键菜单、声卡图标等
- regsvr32 /u /s igfxpph.dll
- reg delete HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers /f
- reg add HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\new /ve /d {D969A300-E7FF-11d0-A93B-00A0C90F2719}
- reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v HotKeysCmds /f >nul 2>nul
- reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IgfxTray /f >nul 2>nul
- reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v Persistence /f >nul 2>nul
- reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SoundMan /f >nul 2>nul
- reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v S3Trayp /f >nul 2>nul
- reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v VModes /f >nul 2>nul
- reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v VTTimer /f >nul 2>nul
- reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SigmatelSysTrayApp /f >nul 2>nul
- reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v RTHDVCPL /f >nul 2>nul
- echo 取本地连接值
- ipconfig | find "adapter" && set name=adapter
- ipconfig | find "以太网适配器" && set name=以太网适配器
- if "%name%"=="adapter" for /f "tokens=3,4 delims=: " %%a in ('ipconfig ^| find "%name%"') do set name=%%a %%b
- if "%name%"=="以太网适配器" for /f "tokens=2,3 delims=: " %%a in ('ipconfig ^| find "%name%"') do set name=%%a %%b
- echo %name%
- :LOOP
- if "%name:~-1%"==" " set name=%name:~0,-1%&&goto LOOP
- if "%name:~-1%"==" " set name=%name:~0,-1%&&goto LOOP
- if "%name:~-2%"==" " set name=%name:~0,-1%&&goto LOOP
- if "%name:~-2%"==" " set name=%name:~0,-1%&&goto LOOP
- echo 已取得本地连接是:"%name%"
- echo.
- :SEAT
- echo.
- set /p seat=请输入本次的坐位号:<nul
- set /p seat=
- :SLOOP
- if "%seat:~-1%"==" " set name=%seat:~0,-1%&&goto SLOOP
- if "%seat:~-1%"==" " set name=%seat:~0,-1%&&goto SLOOP
- if "%seat:~-2%"==" " set name=%seat:~0,-1%&&goto SLOOP
- if "%seat:~-2%"==" " set name=%seat:~0,-1%&&goto SLOOP
- if "%seat:~0,1%"==" " set name=%seat:~1%&&goto SLOOP
- if "%seat:~0,1%"==" " set name=%seat:~1%&&goto SLOOP
- echo 已取得坐位号是:"%seat%"
- if %seat% lss 1 echo 座位号不符合规范,请重新输入。&goto SEAT
- if %seat% gtr 99 echo 座位号不符合规范,请重新输入。&goto SEAT
- if %seat% leq 9 set seat=0%seat%
- echo 机器名为“PC2211_%seat%”,ip地址为192.168.%segment%.%seat%
- echo on
- netsh interface ip set address name = "%name%" source = static addr = 192.168.%segment%.%seat% mask = "255.255.224.0"
- netsh interface ip set address name="%name%" static 192.168.%segment%.%seat% 255.255.224.0 192.168.32.1 1
- netsh interface ip set dns source=static 211.137.96.205 name="%name%"
- if "%密码%"=="0" set 密码=
- set pcname=C2211-%seat%
- echo Windows Registry Editor Version 5.00>ComputerName.reg
- echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam]>>ComputerName.reg
- echo @="%pcname%">>ComputerName.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName]>>ComputerName.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName]>>ComputerName.reg
- echo "ComputerName"="%pcname%">>ComputerName.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName]>>ComputerName.reg
- echo "ComputerName"="%pcname%">>c:\TempInfo.reg>>ComputerName.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog]>>ComputerName.reg
- echo "ComputerName"="%pcname%">>ComputerName.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName]>>ComputerName.reg
- echo "ComputerName"="%pcname%">>ComputerName.reg
- echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]>>ComputerName.reg
- echo "NV Hostname"="%pcname%">>ComputerName.reg
- echo "Hostname"="%pcname%">>ComputerName.reg
- echo [HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\ShellNoRoam]>>ComputerName.reg
- echo @="%pcname%">>ComputerName.reg
- regedit /s ComputerName.reg
- del /f /q ComputerName.reg
- del /f /q /a:s "C:\Users\Administrator\Desktop\desktop.ini"
- del /f /q "%~dpnx0%"
- pause
复制代码 |
|