<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>奋斗博客 &#187; bat</title>
	<atom:link href="http://www.fendou.info/tag/bat/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fendou.info</link>
	<description>WordPress&#124;SEO&#124;Web&#124;Linux&#124;Windows&#124;Android</description>
	<lastBuildDate>Sat, 04 Feb 2012 13:56:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>BAT版RAR分割工具</title>
		<link>http://www.fendou.info/bat-rar-tool/</link>
		<comments>http://www.fendou.info/bat-rar-tool/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 14:47:55 +0000</pubDate>
		<dc:creator>dev</dc:creator>
				<category><![CDATA[操作系统]]></category>
		<category><![CDATA[bat]]></category>
		<category><![CDATA[RAR]]></category>
		<category><![CDATA[分割]]></category>
		<category><![CDATA[工具]]></category>
		<category><![CDATA[批处理]]></category>

		<guid isPermaLink="false">http://www.fendou.info/?p=889</guid>
		<description><![CDATA[一般论坛或者网络硬盘在上传文件的时候都做了大小限制，必须在上传前先给文件打包分割成规定上传大小。WinRAR虽然有分割压缩的功能，但是如果本身要分割的文件就是已经压缩过的就比较麻烦了，还的先解压缩然后再用WinRAR分割压缩，而且还需事先计算好分割块的大小，虽然WinRAR有命令行打包的功能，但是我想那功能没几个人会用。 <a href="http://www.fendou.info/bat-rar-tool/">继续阅读 <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;"></font></b></td>
    </tr>
    
        <tr>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="XP 双开3389工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fxp-open-3389-tool%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2012/02/04/14760404.png" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">XP 双开3389工具</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="QQ批量登陆器" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fbat-login-qq-account%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/23/11310634.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">QQ批量登陆器</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="批处理开启远程桌面" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/10/16/9293850.png" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">批处理开启远程桌面</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="13个在线网站性能测试工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2F13-website-performance-testing-tools%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/10/16/9293252.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">13个在线网站性能测试工具</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="25个提高网站可用性和转化率的工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2F25-tools-to-improve-your-website%25E2%2580%2599s-usability%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/03/30/4607505.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">25个提高网站可用性和转化率的工具</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>一般论坛或者网络硬盘在上传文件的时候都做了大小限制，必须在上传前先给文件打包分割成规定上传大小。WinRAR虽然有分割压缩的功能，但是如果本身要分割的文件就是已经压缩过的就比较麻烦了，还的先解压缩然后再用WinRAR分割压缩，而且还需事先计算好分割块的大小，虽然WinRAR有命令行打包的功能，但是我想那功能没几个人会用。</p>
<p>最近用网络U盘用比较多，而且上传的都是比较大的压缩文件，用WinRAR解了在压实在太麻烦，于是找到了这个NB的BAT版RAR分割工具。这个分割工具是深度论坛推出的RAR 自动分卷压缩助手，是用BAT写的小程序，调用WinRAR来分割文件，配置简单可操作性强。</p>
<p>BAT版RAR分割工具代码在下面，直接COPY然后保存为.bat文件就可以用了。<span id="more-889"></span></p>
<pre>
::   深度技术论坛《RAR 自动分卷压缩助手》  

::  -------------------------------- 使用方法 -----------------------------
::
::     将需要打包的单个文件或者单个目录，托拽到本文件图标上面，
::     Auto_rar.bat 会自动调用 rar.exe， 将提交的文件或者目录分割成指定大小
::     的分卷rar压缩文件，并保存在指定的目录中。
::     对于提交的 7zip、rar、jpg 文件，Auto_rar.bat 只分卷打包，不压缩。
::
::  xxsz  http://www.deepin.org  Email: szwluo@126.com  QQ: 283779584

@echo off

:: --------------------------------------------------------------------
::          设定文件分割之后放置的目录、设定要分割之后每卷的大小
::
::    set BBSpath，设定文件分割之后放置的目录，结尾不能有“\”
::
::    set size=500k  表示分割成每卷 500k 大小；
::    set size=2m    表示分割成每卷 2M 大小；
::    set size=      没有赋值时，表示不分卷。
::                   注意：“k”、“m”不能大写，一定要小写，
::
::    注意：赢政BBS 表示的附件可以是512K，实际只能上传 500K 的附件
:: --------------------------------------------------------------------
set size=500k
set BBSpath=c:\bbsup

if {%1}=={} goto readme

:: --------------------------------------------------------------------
::              定位 rar.exe 目录位置，请确认已经安装了Winrar
:: --------------------------------------------------------------------

del %temp%\Auto_rar_readme.txt >nul
del %temp%\$cd$.txt >nul
reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.rar\ShellNew" /v "FileName">%temp%\$cd$.txt
for /f "skip=4 tokens=3 delims=	" %%i in (%temp%\$cd$.txt) do set rarpath=%%~dpi
del %temp%\$cd$.txt

if exist "%rarpath%rar.exe" goto rarfile
if exist "%ProgramFiles%\winrar\rar.exe" set rarpath=%ProgramFiles%\winrar\
if not exist "%ProgramFiles%\winrar\rar.exe" goto norar

:: --------------------------------------------------------------------
::           开始使用 rar.exe 分卷压缩目标文件
:: --------------------------------------------------------------------
:rarfile
:: ----------------------------------------------------
::    修正了文件名中包含“;” 出错的问题 wz
:: ----------------------------------------------------
FOR /F "delims=" %%i IN ('echo %*') DO set name=%%~ni
md %BBSpath%
md %BBSpath%\%name%
set ext=%~x1
:: -----------------------------------------------------------------
::     -m<n>   设置压缩模式:
::   -m0 存储；-m1 最快；-m2 较快； -m3 标准； -m4   较好； -m5 最好
:: ------------------------------------------------------------------
set level=5
if {%ext%}=={.7z} set level=0
if {%ext%}=={.7Z} set level=0
if {%ext%}=={.rar} set level=0
if {%ext%}=={.RAR} set level=0
if {%ext%}=={.jpg} set level=0
if {%ext%}=={.JPG} set level=0

@echo -------------------- %name% 分割纪录 -------------------- >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo. >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo %date%>>%BBSpath%\%name%\%name%_分割纪录.txt
@echo %time% 分割开始>>%BBSpath%\%name%\%name%_分割纪录.txt
@echo. >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo 分割的原始文件为：>>%BBSpath%\%name%\%name%_分割纪录.txt
@echo ├→ %1>>%BBSpath%\%name%\%name%_分割纪录.txt
@echo │ >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo 分割生成了以下文件，每个文件大小为 %size% ：>>%BBSpath%\%name%\%name%_分割纪录.txt
:: --------------------
::     压缩开始了！
:: --------------------
"%rarpath%rar.exe" a  -ep1 -m%level% -v%size% %BBSpath%\%name%\%name%.rar %1
@FOR /r %BBSpath%\%name% %%I in (*.rar) DO (
@echo ├─ %%I>>%BBSpath%\%name%\%name%_分割纪录.txt
)
@echo │ >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo %time% 分割完成。>>%BBSpath%\%name%\%name%_分割纪录.txt
@echo. >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo 将以上文件上传到 BBS 吧！>>%BBSpath%\%name%\%name%_分割纪录.txt
@echo. >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo ----------------------------- www.deepin.org -------------------------- >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo. >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo. >>%BBSpath%\%name%\%name%_分割纪录.txt
@echo. >>%BBSpath%\%name%\%name%_分割纪录.txt
start explorer %BBSpath%\%name%
set name=
goto end

:: --------------------------------------------------------------------
::           系统中找不到 rar.exe 时候的错误提示
:: --------------------------------------------------------------------
:norar
del %temp%\Auto_rar_readme.txt >nul
@echo ================ 错误提示：================>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo 在您的电脑中没有找到 rar.exe 。>>%temp%\Auto_rar_readme.txt
@echo 请确认您已经安装了 Winrar 。>>%temp%\Auto_rar_readme.txt
@echo 请确认 %rarpath%rar.exe 文件是否存在。>>%temp%\Auto_rar_readme.txt
@echo 重新安装 Winrar 可以修复这个问题。>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo ============== 错误提示结束 ==============>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo         《RAR 自动分卷压缩助手》      www.deepin.org >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo 问：这个小东西可以干啥呢？>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo    答： 使用 Winrar 自动将文件或者目录进行分卷打包成指定的大小，>>%temp%\Auto_rar_readme.txt
@echo         拖一下鼠标就可以搞定，方便快捷，上传到 BBS 更方便！ >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo 问：既然已经安装了 Winrar，还要这个干啥？>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo    答： Winrar 不能对已经压缩过的文件进行分卷打包。>>%temp%\Auto_rar_readme.txt
@echo         这个小东西却可以，这个小工具操作也比winrar方便快捷。>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo -------------------------------- 使用方法 ----------------------------- >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo    将需要打包的单个文件或者单个目录，托拽到 Auto_rar.bat 上面，>>%temp%\Auto_rar_readme.txt
@echo    Auto_rar.bat 会自动调用 rar.exe， 将提交的文件或者目录分割成指定大小>>%temp%\Auto_rar_readme.txt
@echo    的分卷rar压缩文件，并保存在指定的目录中。 >>%temp%\Auto_rar_readme.txt
@echo    对于提交的 7zip、rar、jpg 文件，Auto_rar.bat 只分卷打包，不压缩。 >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo        提示： 用记事本打开 Auto_rar.bat 文件，修改以下参数>>%temp%\Auto_rar_readme.txt
@echo             ┏━━━━━━━━━━━━━┓>>%temp%\Auto_rar_readme.txt
@echo             ┃   set size=500k          ┃>>%temp%\Auto_rar_readme.txt
@echo             ┃   set BBSpath=c:\bbsup   ┃>>%temp%\Auto_rar_readme.txt
@echo             ┗━━━━━━━━━━━━━┛>>%temp%\Auto_rar_readme.txt
@echo        可以设置分卷的大小，以及分卷文件保存的位置。>>%temp%\Auto_rar_readme.txt
@echo        Auto_rar.bat 文件中包含详细的设置指南。>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo ----------------------------- www.deepin.org -------------------------- >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo 注意问题：>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo 1、这个小工具需要调用 rar.exe，确认您已经安装了 Winrar。>>%temp%\Auto_rar_readme.txt
@echo 2、提交的文件名或者目录名不能包含有“;”小分号。>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt

start notepad.exe %temp%\Auto_rar_readme.txt
goto end

:: --------------------------------------------------------------------
::                    没有提交文件时，弹出的使用说明
:: --------------------------------------------------------------------
:readme
del %temp%\Auto_rar_readme.txt >nul
@echo         《RAR 自动分卷压缩助手》      www.deepin.org >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo 问：这个小东西可以干啥呢？>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo    答： 使用 Winrar 自动将文件或者目录进行分卷打包成指定的大小，>>%temp%\Auto_rar_readme.txt
@echo         拖一下鼠标就可以搞定，方便快捷，上传到 BBS 更方便！ >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo 问：既然已经安装了 Winrar，还要这个干啥？>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo    答： Winrar 不能对已经压缩过的文件进行分卷打包。>>%temp%\Auto_rar_readme.txt
@echo         这个小东西却可以，这个小工具操作也比winrar方便快捷。>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo -------------------------------- 使用方法 ----------------------------- >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo    将需要打包的单个文件或者单个目录，托拽到 Auto_rar.bat 上面，>>%temp%\Auto_rar_readme.txt
@echo    Auto_rar.bat 会自动调用 rar.exe， 将提交的文件或者目录分割成指定大小>>%temp%\Auto_rar_readme.txt
@echo    的分卷rar压缩文件，并保存在指定的目录中。 >>%temp%\Auto_rar_readme.txt
@echo    对于提交的 7zip、rar、jpg 文件，Auto_rar.bat 只分卷打包，不压缩。 >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo        提示： 用记事本打开 Auto_rar.bat 文件，修改以下参数>>%temp%\Auto_rar_readme.txt
@echo             ┏━━━━━━━━━━━━━┓>>%temp%\Auto_rar_readme.txt
@echo             ┃   set size=500k          ┃>>%temp%\Auto_rar_readme.txt
@echo             ┃   set BBSpath=c:\bbsup   ┃>>%temp%\Auto_rar_readme.txt
@echo             ┗━━━━━━━━━━━━━┛>>%temp%\Auto_rar_readme.txt
@echo        可以设置分卷的大小，以及分卷文件保存的位置。>>%temp%\Auto_rar_readme.txt
@echo        Auto_rar.bat 文件中包含详细的设置指南。>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo ----------------------------- www.deepin.org---------------------- >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo 注意问题：>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo 1、这个小工具需要调用 rar.exe，确认您已经安装了 Winrar。>>%temp%\Auto_rar_readme.txt
@echo 2、提交的文件名或者目录名不能包含有“;”小分号。>>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt
@echo. >>%temp%\Auto_rar_readme.txt

start notepad.exe %temp%\Auto_rar_readme.txt
goto end

:end
set size=
set BBSpath=
set name=
set rarpath=
set level=
</pre>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;"></font></b></td>
    </tr>
    
        <tr>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="XP 双开3389工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fxp-open-3389-tool%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2012/02/04/14760404.png" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">XP 双开3389工具</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="QQ批量登陆器" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fbat-login-qq-account%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/23/11310634.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">QQ批量登陆器</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="批处理开启远程桌面" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/10/16/9293850.png" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">批处理开启远程桌面</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="13个在线网站性能测试工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2F13-website-performance-testing-tools%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/10/16/9293252.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">13个在线网站性能测试工具</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="25个提高网站可用性和转化率的工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2F25-tools-to-improve-your-website%25E2%2580%2599s-usability%2F&from=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/03/30/4607505.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">25个提高网站可用性和转化率的工具</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.fendou.info/bat-rar-tool/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>批处理开启远程桌面</title>
		<link>http://www.fendou.info/open-remote-desktop-in-cmd/</link>
		<comments>http://www.fendou.info/open-remote-desktop-in-cmd/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 14:52:34 +0000</pubDate>
		<dc:creator>dev</dc:creator>
				<category><![CDATA[操作系统]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[bat]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[psexec]]></category>
		<category><![CDATA[rpc]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[xp]]></category>
		<category><![CDATA[命令行]]></category>
		<category><![CDATA[远程桌面]]></category>

		<guid isPermaLink="false">http://www.fendou.info/?p=427</guid>
		<description><![CDATA[在大型网络中管理远程服务器最方便的就是用Windows远程桌面，但是有的时候又接触不到服务器，那么就需要远程开启远程桌面，方法很多，今天介绍一个简单的方法用命令行开启远程电脑的远程桌面服务。 <a href="http://www.fendou.info/open-remote-desktop-in-cmd/">继续阅读 <span class="meta-nav">&#8594;</span></a><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;"></font></b></td>
    </tr>
    
        <tr>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="浏览器也能连接远程桌面" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fexplorer-remote-desktop%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/20/11175202.gif" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">浏览器也能连接远程桌面</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="如何用手机远程控制电脑" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fhow-to-control-the-computer-remotely-using-a-mobile-phone%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/19/11100405.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">如何用手机远程控制电脑</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="XP 双开3389工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fxp-open-3389-tool%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2012/02/04/14760404.png" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">XP 双开3389工具</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="windows2003架设VPN穿越Juniper防火墙设置步骤" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fwindows2003-set-up-vpn%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/05/10325218.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">windows2003架设VPN穿越Juniper防火墙设置步骤</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="BAT版RAR分割工具 " style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/24/11427723.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">BAT版RAR分割工具 </font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在大型网络中管理远程服务器最方便的就是用Windows远程桌面，但是有的时候又接触不到服务器，那么就需要远程开启远程桌面，方法很多，今天介绍一个简单的方法用命令行开启远程电脑的远程桌面服务。前提是要知道管理员的密码和和本地安全策略中网络访问模式应为“本地用户以自己的身份验证”。</p>
<p>一般windows2003的网络访问模式默认就是“本地用户以自己的身份验证”。而XP则是“本地账户以来宾的身份验证”，如何查看请打开运行输入cmd-&gt;gpedit.msc-&gt;计算机配置-&gt;本地策略-&gt;安全选项-&gt;网络访问：本地账户的共享和安全模式。有的时候不能访问Xp的默认共享就是因为这项的设置原因。</p>
<p>在以上前提条件下，我们就可以通过命令行来直接打开远程主机的远程桌面了。还要借助一个小工具Psexec。<span id="more-427"></span></p>
<blockquote><p>Psexec实用工具（如 Telnet）和远程控制程序（如 Symantec 的 PC Anywhere）使您可以在远程系统上执行程序，但安装它们非常困难，并且需要您在想要访问的远程系统上安装客户端软件。PsExec 是一个轻型的 telnet 替代工具，它使您无需手动安装客户端软件即可执行其他系统上的进程，并且可以获得与控制台应用程序相当的完全交互性。PsExec 最强大的功能之一是在远程系统和远程支持工具（如 IpConfig）中启动交互式命令提示窗口，以便显示无法通过其他方式显示的有关远程系统的信息。注意：某些反病毒扫描程序会报告其中的一个或多个工具感染了“远程管理”病毒。这些 PsTools 都不带病毒，但是如果病毒使用了这些工具，则它们可能触发病毒通知。</p></blockquote>
<p>好了，请看下面的批处理代码：</p>
<p>open.bat</p>

<div class="wp_syntax"><div class="code"><pre class="vbscript" style="font-family:monospace;">echo Windows Registry Editor Version 5.00&gt;3389.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]&gt;&gt;3389.reg
echo &quot;fDenyTSConnections&quot;=dword:00000000&gt;&gt;3389.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp]&gt;&gt;3389.reg
echo &quot;PortNumber&quot;=dword:00000d3d&gt;&gt;3389.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]&gt;&gt;3389.reg
echo &quot;PortNumber&quot;=dword:00000d3d&gt;&gt;3389.reg
regedit /s 3389.reg
del 3389.reg</pre></div></div>

<p>close.bat</p>

<div class="wp_syntax"><div class="code"><pre class="vbscript" style="font-family:monospace;">echo Windows Registry Editor Version 5.00&gt;3389.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]&gt;&gt;3389.reg
echo &quot;fDenyTSConnections&quot;=dword:00000001&gt;&gt;3389.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp]&gt;&gt;3389.reg
echo &quot;PortNumber&quot;=dword:00000d3d&gt;&gt;3389.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]&gt;&gt;3389.reg
echo &quot;PortNumber&quot;=dword:00000d3d&gt;&gt;3389.reg
regedit /s 3389.reg
del 3389.reg</pre></div></div>

<p>解释一下open.bat是开启远程桌面 close.bat是关闭远程桌面，比较一下只有两个键值不同。这两个注册表也可以适用用在本机直接运行就可以开启或关闭本机的远程桌面。</p>
<p>3389.bat 这个算是主程序吧</p>

<div class="wp_syntax"><div class="code"><pre class="vbscript" style="font-family:monospace;">@echo off
echo Input The Remote Server IP:
set /p IP=
echo Input The Remote Server Username:
set /p username=
echo Input The Remote Server Password:
set /p password=
echo Select you operation:
echo Open  Remote Desktop Press (o)
echo Close Remote Desktop Press (s)
set /p select=
if %select%==o psexec.exe \\%ip% -u %username% -p %password% -c open.bat	
if %select%==s psexec.exe \\%ip% -u %username% -p %password% -c close.bat</pre></div></div>

<p>运行后只要输入远程电脑的IP 用户名和密码 再选择是打开还是关闭远程桌面就可以了。此外还可以用<a href="http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html">Bat To Exe Converter</a>把bat转换成为exe文件。我做好了一个效果图如下：<br />
<img src="http://www.fendou.info/wp-content/uploads/2009/12/3389.PNG" alt="3389" title="3389" width="409" height="226" class="aligncenter size-full wp-image-430" /></p>
<p>bat源码和psexec下载点<a href="http://www.rayfile.com/zh-cn/files/1a3d122b-e4d2-11de-9ce3-0014221b798a/">这里</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;"></font></b></td>
    </tr>
    
        <tr>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="浏览器也能连接远程桌面" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fexplorer-remote-desktop%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/20/11175202.gif" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">浏览器也能连接远程桌面</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="如何用手机远程控制电脑" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fhow-to-control-the-computer-remotely-using-a-mobile-phone%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/19/11100405.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">如何用手机远程控制电脑</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="XP 双开3389工具" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fxp-open-3389-tool%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2012/02/04/14760404.png" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">XP 双开3389工具</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="windows2003架设VPN穿越Juniper防火墙设置步骤" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fwindows2003-set-up-vpn%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/05/10325218.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">windows2003架设VPN穿越Juniper防火墙设置步骤</font>
                    </a>
                </td>
                <td width="111" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="BAT版RAR分割工具 " style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fendou.info%2Fbat-rar-tool%2F&from=http%3A%2F%2Fwww.fendou.info%2Fopen-remote-desktop-in-cmd%2F">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 105px !important; height: 105px !important;" src="http://static.wumii.com/site_images/2011/11/24/11427723.jpg" width="105px" height="105px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 111px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">BAT版RAR分割工具 </font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.fendou.info/open-remote-desktop-in-cmd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

