﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-兔子的技术博客-随笔分类-软件使用和系统维护</title><link>http://www.cppblog.com/flyinghare/category/16174.html</link><description>兔子</description><language>zh-cn</language><lastBuildDate>Wed, 16 Oct 2013 12:09:16 GMT</lastBuildDate><pubDate>Wed, 16 Oct 2013 12:09:16 GMT</pubDate><ttl>60</ttl><item><title>批处理比较数值大小 lss，equ和gtr的用法</title><link>http://www.cppblog.com/flyinghare/archive/2013/10/16/203775.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Wed, 16 Oct 2013 11:46:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2013/10/16/203775.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/203775.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2013/10/16/203775.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/203775.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/203775.html</trackback:ping><description><![CDATA[<div style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">批处理比较数值大小 lss，equ和gtr的用法<p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px; line-height: 20px;"><span style="word-wrap: break-word;"><a href="http://panfutian.blog.163.com/blog/#m=0&amp;t=1&amp;c=fks_084067084086088070084083081095085082084071092095084067" rel="nofollow" target="_blank" style="word-wrap: break-word; text-decoration: none; color: #19599b;">&#9733;电脑综合&#9733;</a>&nbsp;<span style="word-wrap: break-word;">2010-04-17 14:18:39</span>&nbsp;<span style="word-wrap: break-word;">阅读<span style="word-wrap: break-word;">196</span></span>&nbsp;<span style="word-wrap: break-word;">评论<span style="word-wrap: break-word;">0</span></span>&nbsp;</span><span style="word-wrap: break-word;">&nbsp;&nbsp; 字号：<span style="word-wrap: break-word;"><u style="word-wrap: break-word;">大</u></span><span style="word-wrap: break-word;"><strong style="word-wrap: break-word;">中</strong></span><span style="word-wrap: break-word;"><u style="word-wrap: break-word;">小</u></span></span><span style="word-wrap: break-word;">&nbsp;<a rel="nofollow" style="word-wrap: break-word; color: #19599b;">订阅</a></span></p><div style="word-wrap: break-word;"><div style="word-wrap: break-word;"><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp; EQU - 等于<br style="word-wrap: break-word;" />NEQ - 不等于<br style="word-wrap: break-word;" />LSS - 小于<br style="word-wrap: break-word;" />LEQ - 小于或等于<br style="word-wrap: break-word;" />GTR - 大于<br style="word-wrap: break-word;" />GEQ - 大于或等于</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">比较大小.bat的源程序如下：<br style="word-wrap: break-word;" /><br style="word-wrap: break-word;" />@echo off<br style="word-wrap: break-word;" />set /p 第一个数=请输入第一个数- c% F. C2 k: ~# R<br style="word-wrap: break-word;" />set /p 第二个数=请输入第二个数<br style="word-wrap: break-word;" />if %第二个数% lss %第一个数% goto hero7 |! U; ~8 ?5 ?7 p9 g6 v. Y3 w" K0 v<br style="word-wrap: break-word;" />if %第二个数% equ %第一个数% goto her<br style="word-wrap: break-word;" />if %第二个数% gtr %第一个数% goto he9 @! i8 q&amp; c; j; Z/ Q% ]<br style="word-wrap: break-word;" />pause2 W) H7 w/ R$ @&nbsp;&nbsp; g8 P<br style="word-wrap: break-word;" />exit<br style="word-wrap: break-word;" />:hero&amp; b8 K1 _5 C' U0 A/ l% D<br style="word-wrap: break-word;" />echo 第一个数比第二个数大！<br style="word-wrap: break-word;" />pause# A6 \8 X9 P) t- B9 Z- g2 e1 a<br style="word-wrap: break-word;" />%0<br style="word-wrap: break-word;" />:her' t) K1 j. h# L<br style="word-wrap: break-word;" />echo 第一个数等于第二个数！<br style="word-wrap: break-word;" />pause<br style="word-wrap: break-word;" />%0<br style="word-wrap: break-word;" />:he- o$ e* U# ]" }4 |! V% ^" c<br style="word-wrap: break-word;" />echo 第一个数比第二个数小！<br style="word-wrap: break-word;" />pause<br style="word-wrap: break-word;" />%07 \! s- e$ [0 E6 @<br style="word-wrap: break-word;" />: T+ d6 Y# o0 [" H4 P% C<br style="word-wrap: break-word;" /><br style="word-wrap: break-word;" />比较大小另 版.bat 的源程序如下：<br style="word-wrap: break-word;" />5 B. b6 H8 i/ D* L<br style="word-wrap: break-word;" />@echo off; R% @1 ~% g' W<br style="word-wrap: break-word;" />set /p 第一个数=请输入第一个数<br style="word-wrap: break-word;" />set /p 第二个数=请输入第二个数<br style="word-wrap: break-word;" />if %第二个数% lss %第一个数% goto hero<br style="word-wrap: break-word;" />if %第二个数% equ %第一个数% goto her' N( d7 j&nbsp;&nbsp; i$ r8 e" A<br style="word-wrap: break-word;" />if %第二个数% gtr %第一个数% goto he" h2 ~4 P2 m' V<br style="word-wrap: break-word;" />:hero0 h( k, ?) \( C" t, \<br style="word-wrap: break-word;" />echo 第一个数比第二个数大！5 a4 i$ L7 p% M; e% ]! T<br style="word-wrap: break-word;" />pause<br style="word-wrap: break-word;" />goto end<br style="word-wrap: break-word;" />:her&amp; ~2 r' Q7 X! g: j0 I&amp; x<br style="word-wrap: break-word;" />echo 第一个数等于第二个数！<br style="word-wrap: break-word;" />pause$ k4 |( v4 B: _$ `" ~<br style="word-wrap: break-word;" />goto end<br style="word-wrap: break-word;" />:he&nbsp;&nbsp; ^3 U/ K* S" W- D7 o: t<br style="word-wrap: break-word;" />echo 第一个数比第二个数小！<br style="word-wrap: break-word;" />pause<br style="word-wrap: break-word;" />goto end<br style="word-wrap: break-word;" />:end. t; R( v+ H# l4 C0 l( f( _. q# i<br style="word-wrap: break-word;" />exit<br style="word-wrap: break-word;" /><br style="word-wrap: break-word;" /><br style="word-wrap: break-word;" /><br style="word-wrap: break-word;" /><br style="word-wrap: break-word;" /><br style="word-wrap: break-word;" /><strong style="word-wrap: break-word;"><span style="word-wrap: break-word;">命令行下如何用批处理比较数据大小？</span></strong></p><div style="word-wrap: break-word;"><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;"><strong style="word-wrap: break-word;"><br style="word-wrap: break-word;" />set var1=3<br style="word-wrap: break-word;" />set var2=2<br style="word-wrap: break-word;" />if %var1% GTR %var2% goto ...<br style="word-wrap: break-word;" /></strong><br style="word-wrap: break-word;" /><strong style="word-wrap: break-word;">if /?:</strong><br style="word-wrap: break-word;" />执行批处理程序中的条件处理。<br style="word-wrap: break-word;" />IF [NOT] ERRORLEVEL number command<br style="word-wrap: break-word;" />IF [NOT] string1==string2 command<br style="word-wrap: break-word;" />IF [NOT] EXIST filename command<br style="word-wrap: break-word;" />NOT &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 指定只有条件为 false 的情况下，Windows 才<br style="word-wrap: break-word;" />应该执行该命令。<br style="word-wrap: break-word;" />ERRORLEVEL number 如果最后运行的程序返回一个等于或大于<br style="word-wrap: break-word;" />指定数字的退出编码，指定条件为 true。<br style="word-wrap: break-word;" />string1==string2&nbsp;&nbsp; 如果指定的文字字符串匹配，指定条件为 true。<br style="word-wrap: break-word;" />EXIST filename 如果指定的文件名存在，指定条件为 true。<br style="word-wrap: break-word;" />command &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 如果符合条件，指定要执行的命令。如果指定的<br style="word-wrap: break-word;" />条件为 FALSE，命令后可跟一个执行 ELSE&nbsp;<br style="word-wrap: break-word;" />关键字后的命令的 ELSE 命令。<br style="word-wrap: break-word;" />ELSE 子句必须在 IF 之后出现在同一行上。例如:<br style="word-wrap: break-word;" />IF EXIST filename. (<br style="word-wrap: break-word;" />del filename.<br style="word-wrap: break-word;" />) ELSE (<br style="word-wrap: break-word;" />echo filename. missing.<br style="word-wrap: break-word;" />)<br style="word-wrap: break-word;" />因为 del 命令需要用一个新行终止，以下子句不会有效:<br style="word-wrap: break-word;" />IF EXIST filename. del filename. ELSE echo filename. missing<br style="word-wrap: break-word;" />由于 ELSE 命令必须与 IF 命令的尾端在同一行上，以下子句也<br style="word-wrap: break-word;" />不会有效:<br style="word-wrap: break-word;" />IF EXIST filename. del filename.<br style="word-wrap: break-word;" />ELSE echo filename. missing<br style="word-wrap: break-word;" />如果都放在同一行上，以下子句有效:<br style="word-wrap: break-word;" />IF EXIST filename. (del filename.) ELSE echo filename. missing<br style="word-wrap: break-word;" />如果命令扩展被启用，IF 会如下改变:<br style="word-wrap: break-word;" />IF [/I] string1 compare-op string2 command<br style="word-wrap: break-word;" />IF CMDEXTVERSION number command<br style="word-wrap: break-word;" />IF DEFINED variable command<br style="word-wrap: break-word;" />其中， compare-op 可以是:<br style="word-wrap: break-word;" />EQU - 等于<br style="word-wrap: break-word;" />NEQ - 不等于<br style="word-wrap: break-word;" />LSS - 小于<br style="word-wrap: break-word;" />LEQ - 小于或等于<br style="word-wrap: break-word;" />GTR - 大于<br style="word-wrap: break-word;" />GEQ - 大于或等于<br style="word-wrap: break-word;" />而 /I 开关(如果指定)说明要进行的字符串比较不分大小写。<br style="word-wrap: break-word;" />/I 开关可以用于 IF 的 string1==string2 的形式上。这些<br style="word-wrap: break-word;" />比较都是通用的；原因是，如果 string1 和 string2 都是<br style="word-wrap: break-word;" />由数字组成的，字符串会被转换成数字，进行数字比较。<br style="word-wrap: break-word;" />CMDEXTVERSION 条件的作用跟 ERRORLEVEL 的一样，除了它<br style="word-wrap: break-word;" />是在跟与命令扩展有关联的内部版本号比较。第一个版本<br style="word-wrap: break-word;" />是 1。每次对命令扩展有相当大的增强时，版本号会增加一个。<br style="word-wrap: break-word;" />命令扩展被停用时，CMDEXTVERSION 条件不是真的。<br style="word-wrap: break-word;" />如果已定义环境变量，DEFINED 条件的作用跟 EXISTS 的一样，<br style="word-wrap: break-word;" />除了它取得一个环境变量，返回的结果是 true。<br style="word-wrap: break-word;" />如果没有名为 ERRORLEVEL 的环境变量，%ERRORLEVEL%<br style="word-wrap: break-word;" />会扩充为 ERROLEVEL 当前数值的字符串表达式；否则，您会得到<br style="word-wrap: break-word;" />其数值。运行程序后，以下语句说明 ERRORLEVEL 的用法:<br style="word-wrap: break-word;" />goto answer%ERRORLEVEL%<br style="word-wrap: break-word;" />:answer0<br style="word-wrap: break-word;" />echo Program had return code 0<br style="word-wrap: break-word;" />:answer1<br style="word-wrap: break-word;" />echo Program had return code 1<br style="word-wrap: break-word;" />您也可以使用以上的数字比较:<br style="word-wrap: break-word;" />IF %ERRORLEVEL% LEQ 1 goto okay<br style="word-wrap: break-word;" />如果没有名为 CMDCMDLINE 的环境变量，%CMDCMDLINE%<br style="word-wrap: break-word;" />将在 CMD.EXE 进行任何处理前扩充为传递给 CMD.EXE 的原始<br style="word-wrap: break-word;" />命令行；否则，您会得到其数值。<br style="word-wrap: break-word;" />如果没有名为 CMDEXTVERSION 的环境变量，<br style="word-wrap: break-word;" />%CMDEXTVERSION% 会扩充为 CMDEXTVERSION 当前数值的<br style="word-wrap: break-word;" />字串符表达式；否则，您会得到其数值。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;"><strong style="word-wrap: break-word;">IF</strong>&nbsp;(DOS命令)</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　执行<a href="http://cache.baidu.com/view/80110.htm" rel="nofollow" target="_blank" style="word-wrap: break-word; text-decoration: none; color: #19599b;">批处理</a>程序中的条件处理。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;[NOT] ERRORLEVEL number command</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;[NOT] string1==string2 command</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;[NOT] EXIST filename command</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　NOT 指定只有条件为 false 的情况下， Windows XP 才</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　应该执行该命令。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　ERRORLEVEL number 如果最后运行的程序返回一个等于或大于</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　指定数字的退出编码，指定条件为 true。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　string1==string2 如果指定的文字字符串匹配，指定条件为 true。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　EXIST filename 如果指定的文件名存在，指定条件为 true。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　command 如果符合条件，指定要执行的命令。如果指定的</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　条件为 FALSE，命令后可跟一个执行 ELSE</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　关键字后的命令的 ELSE 命令。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　ELSE 子句必须在&nbsp;<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;之后出现在同一行上。例如:</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;EXIST filename. (</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　del filename.</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　) ELSE (</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　echo filename. missing.</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　)</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　因为 del 命令需要用一个新行终止，以下子句不会有效:</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;EXIST filename. del filename. ELSE echo filename. missing</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　由于 ELSE 命令必须与&nbsp;<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;命令的尾端在同一行上，以下子句也</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　不会有效:</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;EXIST filename. del filename.</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　ELSE echo filename. missing</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　如果都放在同一行上，以下子句有效:</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;EXIST filename. (del filename.) ELSE echo filename. missing</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　如果命令扩展名被启用，<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;会如下改变:</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;string1 compare-op string2 command</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;CMDEXTVERSION number command</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;DEFINED variable command</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　其中，比较运算符可以是:</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　EQU - 等于</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　NEQ - 不等于</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　LSS - 小于</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　LEQ - 小于或等于</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<a name="baidusnap2" rel="nofollow" style="word-wrap: break-word; color: rgb(25, 89, 155);"></a><strong style="word-wrap: break-word; background-color: #99ff99; color: black;">GTR</strong>&nbsp;- 大于</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　GEQ - 大于或等于</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　及 /I 开关；如果该开关被指定，则说明要进行的字符串比较不分</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　大小写。/I 开关可以用于&nbsp;<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;的 string1==string2 的形式上。这些</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　比较都是通用的；原因是，如果 string1 和 string2 都是由数字</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　组成的，字符串会被转换成数字，进行数字比较。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　CMDEXTVERSION 条件的作用跟 ERRORLEVEL 的一样，除了它</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　是在跟与命令扩展名有关联的内部版本号比较。第一个版本</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　是 1。每次对命令扩展名有相当大的增强时，版本号会增加一个。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　命令扩展名被停用时，CMDEXTVERSION 条件不是真的。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　如果已定义环境变量，DEFINED 条件的作用跟 EXISTS 的一样，</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　除了它取得一个环境变量，返回的结果是 true。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　如果没有名为 ERRORLEVEL 的环境变量，%ERRORLEVEL%</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　会扩充为 ERROLEVEL 当前数值的字符串表达式；否则，您会得到</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　其数值。运行程序后，以下语句说明 ERRORLEVEL 的用法:</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　goto answer%ERRORLEVEL%</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　:answer0</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　echo Program had return code 0</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　:answer1</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　echo Program had return code 1</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　您也可以使用以上的数字比较:</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　<strong style="word-wrap: break-word; background-color: #ffff66; color: black;">IF</strong>&nbsp;%ERRORLEVEL% LEQ 1 goto okay</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　如果没有名为 CMDCMDLINE 的环境变量，%CMDCMDLINE%</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　将在 CMD.EXE 进行任何处理前扩充为传递给 CMD.EXE 的原始</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　命令行；否则，您会得到其数值。</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　如果没有名为 CMDEXTVERSION 的环境变量，</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　%CMDEXTVERSION% 会扩充为 CMDEXTVERSION 当前数值的</p><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">　　字串符表达式；否则，您会得到其数值。</p></div></div><p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">if中gtr的特殊应用(时间&amp;字母对比命令)</p></div></div><div style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">2009年05月06日 星期三 16:49</div><span style="color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">if中gtr的特殊应用作者：youxi01</span><br style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><span style="color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">转载请注明</span><br style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><br style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><span style="color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">一、直接对日期大小进行比较。</span><br style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><span style="color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">比如，我要查找当前目录下，在2005-5-30以后的文件，则可以这样写：</span><div style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;"><span style="word-wrap: break-word;">复制内容到剪贴板</span>&nbsp;代码:<p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">@echo off<br style="word-wrap: break-word;" />for %%i in (*) do if %%~ti gtr 2005-05-30 echo %%~nxi<br style="word-wrap: break-word;" />pause&gt;nul</p></div><span style="color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">二、对字母直接进行比较。</span><div style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;"><span style="word-wrap: break-word;">复制内容到剪贴板</span>&nbsp;代码:<p style="word-wrap: break-word; margin-right: 0px; margin-left: 0px; padding: 0px;">@echo off<br style="word-wrap: break-word;" />call :echo c o<br style="word-wrap: break-word;" />echo.<br style="word-wrap: break-word;" />call :echo d k<br style="word-wrap: break-word;" />pause&gt;nul<br style="word-wrap: break-word;" />:echo startw endw<br style="word-wrap: break-word;" />echo %1 到 %2 之间的字母有：<br style="word-wrap: break-word;" />for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (<br style="word-wrap: break-word;" />if %%i geq %1 if %%i leq %2 set /p=%%i &lt;nul)</p></div><span style="color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">三、更奇妙的是，汉字和英文字也可以比较&#8220;大小&#8221;---找出字符串中的汉字</span><br style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;" /><span style="color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">测试代码：&nbsp;</span><span style="word-wrap: break-word; color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">复制内容到剪贴板</span><span style="color: #666666; font-family: 宋体, Arial; font-size: 12px; line-height: 26px; background-color: #ffffff;">&nbsp;代码:</span>@echo off<br style="word-wrap: break-word;" />setlocal enabledelayedexpansion<br style="word-wrap: break-word;" />set "str=我bat是home好.cn人"<br style="word-wrap: break-word;" />call :test "%str%"<br style="word-wrap: break-word;" />echo 提取出的汉字有：%cstr%<br style="word-wrap: break-word;" />pause&gt;nul<br style="word-wrap: break-word;" />:test<br style="word-wrap: break-word;" />set "var=%~1"<br style="word-wrap: break-word;" />for /l %%i in (0 1 20) do (<br style="word-wrap: break-word;" />set "var_=!var:~%%i,1!"<br style="word-wrap: break-word;" />if "!var_!"=="" goto :eof<br style="word-wrap: break-word;" />if !var_! gtr Z set cstr=!cstr!!var_!<br /><br /><br />转自：<a href="http://blog.chinaunix.net/uid-78707-id-3473907.html">http://blog.chinaunix.net/uid-78707-id-3473907.html</a><img src ="http://www.cppblog.com/flyinghare/aggbug/203775.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2013-10-16 19:46 <a href="http://www.cppblog.com/flyinghare/archive/2013/10/16/203775.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>windows server 2008 忘记登陆密码忘记</title><link>http://www.cppblog.com/flyinghare/archive/2013/05/05/199985.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Sun, 05 May 2013 09:24:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2013/05/05/199985.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/199985.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2013/05/05/199985.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/199985.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/199985.html</trackback:ping><description><![CDATA[<h2><div style="display: inline-block;"></div></h2><h2><div reader-page=""  complex"="" style="margin: 0px 0px 6px; overflow: hidden; background-color: #ffffff; width: 815px; color: #333333; font-family: arial, helvetica, clean; font-size: 12px; font-weight: normal; line-height: 15px;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% -8px; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: left; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 100%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: right; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 100%; background-repeat: no-repeat no-repeat;"></strong></strong></div><div reader-page=""  complex"="" style="margin: 0px 0px 6px; overflow: hidden; background-color: #ffffff; width: 815px; color: #333333; font-family: arial, helvetica, clean; font-size: 12px; font-weight: normal; line-height: 15px;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% 0%; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: left; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 0%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: right; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 0%; background-repeat: no-repeat no-repeat;"></strong></strong><div style="margin: 0px 5px; position: relative;"><div id="pageNo-2" data-page-no="2" data-scale="0.70709782964164" data-render="1" style="margin: 0px; height: 1133.8028169014085px;"><div reader-parent"="" style="margin: 0px; visibility: visible; position: relative; top: 0px; left: 0px; -webkit-transform: scale(0.99); -webkit-transform-origin: 0% 0%;"><div style="margin: 0px; position: absolute; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; position: relative; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; -webkit-transform: scale(0.1); -webkit-transform-origin: 0% 0%; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 1; zoom: 1;"><div style="margin: 0px;"><p reader-word-s2-1=""  reader-word-s2-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020002, 宋体; letter-spacing: -0.3px; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 768px; height: 110px; line-height: 110px; top: 1144px; left: 1232px; z-index: 0;">进入命令行提示</p><p reader-word-s2-3"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 6412px; left: 7928px; z-index: 1;">&nbsp;</p><p reader-word-s2-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020002, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 2738px; height: 110px; line-height: 110px; top: 6697px; left: 1232px; z-index: 2; letter-spacing: -0.6px;">仔细看好下面的这一步，这是最关键的。首先先备份一下</p><p reader-word-s2-3"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620030002, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 601px; height: 110px; line-height: 110px; top: 6697px; left: 3999px; z-index: 3; letter-spacing: -0.37px;">magnify.exe</p><p reader-word-s2-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020002, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 110px; height: 110px; line-height: 110px; top: 6697px; left: 4602px; z-index: 4;">（</p><p reader-word-s2-3"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620030002, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 439px; height: 110px; line-height: 110px; top: 6697px; left: 4711px; z-index: 5; letter-spacing: -0.17px;">windows&nbsp;</p><p reader-word-s2-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020002, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 658px; height: 110px; line-height: 110px; top: 6697px; left: 5150px; z-index: 6; letter-spacing: -0.36px;">放大镜程序）</p><p reader-word-s2-3"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 6697px; left: 5807px; z-index: 7;">&nbsp;</p></div></div><div style="margin: 0px; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 2;"><div style="margin: 0px;"><p style="margin: 0px; padding: 0px; width: 893px; height: 556px; z-index: 8; left: -40.18499999999999px; top: 119.1856873px; opacity: 1; -webkit-transform: scale(0.91, 0.91); position: absolute; overflow: hidden; background-repeat: no-repeat no-repeat;"><img width="893" height="561" src="http://retype.wenku.bdimg.com/retype/pipe/ba8aa5e281c758f5f61f6762?pn=2&amp;rn=1&amp;t=png&amp;v=6" alt="" style="border: 0px; vertical-align: middle; position: absolute; top: 0px; left: 0px; clip: rect(0px 893px 561px 0px);" /></p></div></div><div style="margin: 0px; -webkit-transform: scale(0.1); -webkit-transform-origin: 0% 0%; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 3; zoom: 1;"><div style="margin: 0px;"><p reader-word-s2-2=""  reader-word-s2-3"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; letter-spacing: -0.3px; font-family: 宋体, ba8aa5e281c758f5f61f67620030002, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 1752px; height: 110px; line-height: 110px; top: 7125px; left: 1232px; z-index: 9;">rename&nbsp;magnify.exe&nbsp;magnify.bak&nbsp;&nbsp;</p></div></div></div></div></div></div></div><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% -8px; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: left; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 100%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: right; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 100%; background-repeat: no-repeat no-repeat;"></strong></strong></div><div reader-page=""  complex"="" style="margin: 0px 0px 6px; overflow: hidden; background-color: #ffffff; width: 815px; color: #333333; font-family: arial, helvetica, clean; font-size: 12px; font-weight: normal; line-height: 15px;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% 0%; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: left; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 0%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: right; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 0%; background-repeat: no-repeat no-repeat;"></strong></strong><div style="margin: 0px 5px; position: relative;"><div id="pageNo-3" data-page-no="3" data-scale="0.70709782964164" data-render="1" style="margin: 0px; height: 1133.8028169014085px;"><div reader-parent"="" style="margin: 0px; visibility: visible; position: relative; top: 0px; left: 0px; -webkit-transform: scale(0.99); -webkit-transform-origin: 0% 0%;"><div style="margin: 0px; position: absolute; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; position: relative; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; -webkit-transform: scale(0.1); -webkit-transform-origin: 0% 0%; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 1; zoom: 1;"><div style="margin: 0px;"><p reader-word-s3-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020003, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 330px; height: 110px; line-height: 110px; top: 1144px; left: 1232px; z-index: 0;">然后用</p><p reader-word-s3-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620030003, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 437px; height: 110px; line-height: 110px; top: 1144px; left: 1588px; z-index: 1; letter-spacing: -0.39px;">cmd.exe&nbsp;</p><p reader-word-s3-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020003, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 328px; height: 110px; line-height: 110px; top: 1144px; left: 2027px; z-index: 2; letter-spacing: -0.8999999999999999px;">替换掉</p><p reader-word-s3-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620030003, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 603px; height: 110px; line-height: 110px; top: 1144px; left: 2382px; z-index: 3; letter-spacing: -0.21000000000000002px;">magnify.exe</p><p reader-word-s3-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 6412px; left: 7928px; z-index: 4;">&nbsp;</p><p reader-word-s3-3"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020003, 宋体; letter-spacing: -0.6px; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 767px; height: 110px; line-height: 110px; top: 6697px; left: 1232px; z-index: 5;">重启电脑，到了</p><p reader-word-s3-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620030003, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 217px; height: 110px; line-height: 110px; top: 6697px; left: 2027px; z-index: 6; letter-spacing: -0.8899999999999999px;">2008</p><p reader-word-s3-3"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020003, 宋体; letter-spacing: -0.6px; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 1752px; height: 110px; line-height: 110px; top: 6697px; left: 2274px; z-index: 7;">登录界面。点击轻松访问，然后选上</p><p reader-word-s3-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 6697px; left: 4027px; z-index: 8;">&nbsp;</p><p reader-word-s3-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020003, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 1644px; height: 110px; line-height: 110px; top: 6697px; left: 4081px; z-index: 9; letter-spacing: -0.51px;">放大屏幕的项目（放大镜）应用。</p></div></div><div style="margin: 0px; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 2;"><div style="margin: 0px;"><p style="margin: 0px; padding: 0px; width: 893px; height: 556px; z-index: 10; left: -40.18499999999999px; top: 119.1856873px; opacity: 1; -webkit-transform: scale(0.91, 0.91); position: absolute; overflow: hidden; background-repeat: no-repeat no-repeat;"><img width="893" height="561" src="http://retype.wenku.bdimg.com/retype/pipe/ba8aa5e281c758f5f61f6762?pn=3&amp;rn=1&amp;t=png&amp;v=6" alt="" style="border: 0px; vertical-align: middle; position: absolute; top: 0px; left: 0px; clip: rect(0px 893px 561px 0px);" /></p></div></div><div style="margin: 0px; -webkit-transform: scale(0.1); -webkit-transform-origin: 0% 0%; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 3; zoom: 1;"><div style="margin: 0px;"><p reader-word-s3-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 6697px; left: 5725px; z-index: 11;">&nbsp;</p></div></div></div></div></div></div></div><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% -8px; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: left; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 100%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: right; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 100%; background-repeat: no-repeat no-repeat;"></strong></strong></div><div reader-page=""  complex"="" style="margin: 0px 0px 6px; overflow: hidden; background-color: #ffffff; width: 815px; color: #333333; font-family: arial, helvetica, clean; font-size: 12px; font-weight: normal; line-height: 15px;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% 0%; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: left; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 0%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: right; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 0%; background-repeat: no-repeat no-repeat;"></strong></strong><div style="margin: 0px 5px; position: relative;"><div id="pageNo-4" data-page-no="4" data-scale="0.70709782964164" data-render="1" style="margin: 0px; height: 1133.8028169014085px;"><div reader-parent"="" style="margin: 0px; visibility: visible; position: relative; top: 0px; left: 0px; -webkit-transform: scale(0.99); -webkit-transform-origin: 0% 0%;"><div style="margin: 0px; position: absolute; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; position: relative; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; -webkit-transform: scale(0.1); -webkit-transform-origin: 0% 0%; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 1; zoom: 1;"><div style="margin: 0px;"><p reader-word-s4-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 5984px; left: 7928px; z-index: 0;">&nbsp;</p><p reader-word-s4-3"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020004, 宋体; letter-spacing: -0.6px; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 2738px; height: 110px; line-height: 110px; top: 6270px; left: 1232px; z-index: 1;">看看出来的是什么，激动不，看看咱们是什么身份，输入</p><p reader-word-s4-4"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620030004, 宋体; letter-spacing: -0.32px; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 383px; height: 110px; line-height: 110px; top: 6270px; left: 3999px; z-index: 2;">whoami&nbsp;</p><p reader-word-s4-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020004, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 110px; height: 110px; line-height: 110px; top: 6270px; left: 4382px; z-index: 3;">，</p><p reader-word-s4-4"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620030004, 宋体; letter-spacing: -0.32px; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 383px; height: 110px; line-height: 110px; top: 6270px; left: 4492px; z-index: 4;">system&nbsp;</p><p reader-word-s4-3"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020004, 宋体; letter-spacing: -0.6px; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 767px; height: 110px; line-height: 110px; top: 6270px; left: 4876px; z-index: 5;">咱们就是权威。</p></div></div><div style="margin: 0px; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 2;"><div style="margin: 0px;"><p style="margin: 0px; padding: 0px; width: 893px; height: 557px; z-index: 6; left: -40.18499999999999px; top: 75.332px; opacity: 1; -webkit-transform: scale(0.91, 0.91); position: absolute; overflow: hidden; background-repeat: no-repeat no-repeat;"><img width="893" height="562" src="http://retype.wenku.bdimg.com/retype/pipe/ba8aa5e281c758f5f61f6762?pn=4&amp;rn=1&amp;t=png&amp;v=6" alt="" style="border: 0px; vertical-align: middle; position: absolute; top: 0px; left: 0px; clip: rect(0px 893px 562px 0px);" /></p></div></div><div style="margin: 0px; -webkit-transform: scale(0.1); -webkit-transform-origin: 0% 0%; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 3; zoom: 1;"><div style="margin: 0px;"><p reader-word-s4-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 6270px; left: 5642px; z-index: 7;">&nbsp;</p></div></div></div></div></div></div></div><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% -8px; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: left; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 100%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: right; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 100%; background-repeat: no-repeat no-repeat;"></strong></strong></div><div reader-page=""  complex"="" style="margin: 0px 0px 6px; overflow: hidden; background-color: #ffffff; width: 815px; color: #333333; font-family: arial, helvetica, clean; font-size: 12px; font-weight: normal; line-height: 15px;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% 0%; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: left; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 0%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: right; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 0%; background-repeat: no-repeat no-repeat;"></strong></strong><div style="margin: 0px 5px; position: relative;"><div id="pageNo-5" data-page-no="5" data-scale="0.70709782964164" data-render="1" style="margin: 0px; height: 1133.8028169014085px;"><div reader-parent"="" style="margin: 0px; visibility: visible; position: relative; top: 0px; left: 0px; -webkit-transform: scale(0.99); -webkit-transform-origin: 0% 0%;"><div style="margin: 0px; position: absolute; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; position: relative; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; -webkit-transform: scale(0.1); -webkit-transform-origin: 0% 0%; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 1; zoom: 1;"><div style="margin: 0px;"><p reader-word-s5-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 5989px; left: 7928px; z-index: 0;">&nbsp;</p><p reader-word-s5-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020005, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 658px; height: 110px; line-height: 110px; top: 6270px; left: 1232px; z-index: 1; letter-spacing: -0.36px;">现在可以输入</p><p reader-word-s5-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620030005, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 493px; height: 110px; line-height: 110px; top: 6270px; left: 1917px; z-index: 2; letter-spacing: -0.25px;">explorer,</p><p reader-word-s5-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020005, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 2738px; height: 110px; line-height: 110px; top: 6270px; left: 2410px; z-index: 3; letter-spacing: -0.6px;">看看屏幕有什么变化，任务栏出来了。你可以为所欲为了</p></div></div><div style="margin: 0px; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 2;"><div style="margin: 0px;"><p style="margin: 0px; padding: 0px; width: 893px; height: 557px; z-index: 4; left: -40.18499999999999px; top: 75.332px; opacity: 1; -webkit-transform: scale(0.91, 0.91); position: absolute; overflow: hidden; background-repeat: no-repeat no-repeat;"><img width="893" height="562" src="http://retype.wenku.bdimg.com/retype/pipe/ba8aa5e281c758f5f61f6762?pn=5&amp;rn=1&amp;t=png&amp;v=6" alt="" style="border: 0px; vertical-align: middle; position: absolute; top: 0px; left: 0px; clip: rect(0px 893px 562px 0px);" /></p></div></div><div style="margin: 0px; -webkit-transform: scale(0.1); -webkit-transform-origin: 0% 0%; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 3; zoom: 1;"><div style="margin: 0px;"><p reader-word-s5-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 6270px; left: 5148px; z-index: 5;">&nbsp;</p></div></div></div></div></div></div></div><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% -8px; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: left; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 100%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 10px; width: 5px; float: right; margin-top: -5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 100%; background-repeat: no-repeat no-repeat;"></strong></strong></div><div reader-page=""  complex"="" style="margin: 0px 0px 6px; overflow: hidden; background-color: #ffffff; width: 815px; color: #333333; font-family: arial, helvetica, clean; font-size: 12px; font-weight: normal; line-height: 15px;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 5px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod1_13210b81.png); background-position: 50% 0%; background-repeat: repeat no-repeat;"><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: left; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 0% 0%; background-repeat: no-repeat no-repeat;"></strong><strong style="font-weight: normal; display: block; position: relative; z-index: 10; height: 32000px; width: 5px; float: right; overflow: hidden; margin-bottom: -32000px; background-image: url(http://static.wenku.bdimg.com/static/widget/view/html_view/html_reader/img/mod2_3fefb607.png); background-position: 100% 0%; background-repeat: no-repeat no-repeat;"></strong></strong><div style="margin: 0px 5px; position: relative;"><div id="pageNo-6" data-page-no="6" data-scale="0.70709782964164" data-render="1" style="margin: 0px; height: 1133.8028169014085px;"><div reader-parent"="" style="margin: 0px; visibility: visible; position: relative; top: 0px; left: 0px; -webkit-transform: scale(0.99); -webkit-transform-origin: 0% 0%;"><div style="margin: 0px; position: absolute; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; position: relative; top: 0px; left: 0px; width: 805px; height: 0px;"><div style="margin: 0px; -webkit-transform: scale(0.1); -webkit-transform-origin: 0% 0%; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px; z-index: 1; zoom: 1;"><div style="margin: 0px;"><p reader-word-s6-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: simsun; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 55px; height: 110px; line-height: 110px; top: 5969px; left: 7928px; z-index: 0;">&nbsp;</p><p reader-word-s6-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020006, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 658px; height: 110px; line-height: 110px; top: 6270px; left: 1232px; z-index: 1; letter-spacing: -0.36px;">现在可以运行</p><p reader-word-s6-1"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620030006, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 1643px; height: 110px; line-height: 110px; top: 6270px; left: 1917px; z-index: 2; letter-spacing: -0.3px;">net&nbsp;user&nbsp;administrator&nbsp;******&nbsp;</p><p reader-word-s6-2"="" style="margin: 0px; padding: 0px; color: #545454; font-size: 110px; font-family: 宋体, ba8aa5e281c758f5f61f67620020006, 宋体; position: absolute; white-space: nowrap; -webkit-font-smoothing: antialiased; text-shadow: rgba(0, 0, 0, 0.00392157) 1px 1px 1px; width: 875px; height: 110px; line-height: 110px; top: 6270px; left: 3562px; z-index: 3; letter-spacing: -0.77px;">设置你的密码了</p></div></div></div></div></div></div></div></div>转自：<a href="http://hi.baidu.com/lionwon/item/abc3ced2d545b5df251f4020" style="font-size: 14px;">http://hi.baidu.com/lionwon/item/abc3ced2d545b5df251f4020</a></h2><img src ="http://www.cppblog.com/flyinghare/aggbug/199985.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2013-05-05 17:24 <a href="http://www.cppblog.com/flyinghare/archive/2013/05/05/199985.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>chrome 扩展程序安装问题集</title><link>http://www.cppblog.com/flyinghare/archive/2012/08/08/186686.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Wed, 08 Aug 2012 13:46:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2012/08/08/186686.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/186686.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2012/08/08/186686.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/186686.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/186686.html</trackback:ping><description><![CDATA[<h2>1、如何下载Chrome扩展crx安装文件<br /><span style="font-size: 10pt; ">转自：</span><a href="http://baaluck.diandian.com/post/2011-05-28/1093496"><span style="font-size: 10pt; ">http://baaluck.diandian.com/post/2011-05-28/1093496</span></a></h2><div rich-content"="" style="margin: 0px; line-height: 1.6em; color: #444444; font-family: 'Microsoft Yahei', Tahoma, Arial, Helvetica, STHeiti; font-size: 13px; background-color: #eceef0; "><p style="margin: 0.5em 0px; padding: 0px; ">Chrome扩展文件为crx文件，有时候想要下载保存自己喜欢的扩展的crx安装文件以方便后续安装，具体步骤如下：</p><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;1、获得扩展的id</blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; "><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;进入chrome网上应用店，打开喜欢的扩展的页面，将会从浏览器地址栏看到该扩展的地址，格式为:</blockquote></blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; "><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; "><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">[https://chrome.google.com/webstore/detail/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]</blockquote></blockquote></blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; "><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;则地址最后的32位字符串就是扩展的id。如下图；</blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; "><span style="margin: 0px; padding: 0px; display: block; "><img src="http://m3.img.libdd.com/farm2/197/9431C34080F575731D69178B356575C5_500_328.jpg" width="500" height="328" style="margin: 0px; padding: 0px; max-width: 500px; display: block; "  alt="" /></span></blockquote>2、获得扩展crx文件地址</blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;crx文件地址依据下面的语句获得：</blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;&nbsp;</blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; "><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;String crxAddress ="http://clients2.google.com/service/update2/crx?response=redirect&amp;x=id%3D"+id+"%26uc%26lang%3Den-US&amp;prod=chrome"</blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;&nbsp;</blockquote>依据该语句，步骤1中扩展的crx文件地址为：</blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;&nbsp;</blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; "><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;http://clients2.google.com/service/update2/crx?response=redirect&amp;x=id%3Daknpkdffaafgjchaibgeefbgmgeghloj%26uc%26lang%3Den-US&amp;prod=chrome</blockquote></blockquote><blockquote style="margin: 0.5em 0px 0.5em 1em; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; border-left-width: 3px; border-left-color: #dddddd; ">&nbsp;3、下载只要不通过Chrome浏览器，用你喜欢的任何下载方式下载该crx文件即可，enjoy!</blockquote></div><span style="font-family: 微软雅黑; font-size: 18pt; font-weight: bold; line-height: 24px; background-color: #fcfefc; "><br />2、关于chrome安装crx文件的问题。。</span>&nbsp;<br />转自：<a href="http://zhidao.baidu.com/question/368653720.html">http://zhidao.baidu.com/question/368653720.html</a>&nbsp;<br /><br /><pre id="question-content" data-accusearea="qContent" style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Arial; white-space: pre-wrap; word-wrap: break-word; zoom: 1; line-height: 24px; background-color: #fcfefc; ">在应用商店点击安装。。回变成下载文件。。下载后一拖如浏览器就会。。。又变成下载页面。。球解决。。浏览器是最新的版本了。。</pre><div style="padding-left: 24px; background-image: url(http://img.baidu.com/img/iknow/qb/qb-bg.png); height: 52px; overflow: hidden; margin-bottom: -10px; font-family: arial, 宋体, sans-serif; line-height: 24px; background-position: 0px -110px; background-repeat: repeat no-repeat; "><span ml10=""  bold"="" style="font-weight: bold; margin-left: 10px; float: left; margin-top: 7px; font-size: 15px; font-family: 微软雅黑; ">满意回答</span></div><div style="padding-right: 24px; padding-bottom: 10px; padding-left: 24px; position: relative; z-index: 2; clear: both; zoom: 1; font-family: arial, 宋体, sans-serif; line-height: 24px; "><div style="zoom: 1; "><pre id="best-answer-content"  mb10"="" data-accusearea="aContent" style="margin-top: 0px; margin-bottom: 10px; padding: 0px; font-family: Arial; white-space: pre-wrap; word-wrap: break-word; zoom: 1; line-height: 22px; ">具体这种情况我也遇到过，不过后面chrome更新又好了，你可以等等更新 我这里有个方法，其实一样用 你把下载下来的文件.crx更改后缀名，把.crx改成.rar 也就是改成压缩文件的后缀名，这样你就得到一个压缩文件，然后右键解压这个压缩文件，你会得到一个文件夹 然后打开chrome://settings/extensions，点击上方的&#8220;载入正在开发的扩展程序&#8221;，选中你刚刚解压出来的那一整个文件夹（不要选里面的子文件夹）然后点确定，就直接安装成功了！（注意安装成功以后不要删除在电脑上解压好的那个文件夹，也不要更改那个文件夹的位置，不然就又相当于卸载了&#8230;&#8230;）</pre><div mt10"="" data-accusearea="aRefer" style="margin-top: 10px; word-wrap: break-word; "></div></div></div><h1>3、<a id="cb_post_title_url" href="http://www.cnblogs.com/sniper007/archive/2012/07/10/2584324.html" style="margin: 0px; padding: 0px; font-size: 24px; color: black; text-decoration: none; ">chrome插件无法安装解决方法或者提示&#8220;将该项添加到 Chrome 浏览器时出错。请刷新此页面，然后重试。&#8221;的解决办法<br /><span style="font-weight: normal;"><span style="font-size: 10pt; ">转自</span></span></a><span style="font-size: 10pt; font-weight: normal; ">：</span><a href="http://www.cnblogs.com/sniper007/archive/2012/07/10/2584324.html"><span style="font-size: 10pt; ">http://www.cnblogs.com/sniper007/archive/2012/07/10/2584324.html<br /></span><h2 style="margin: 15px auto 2px; padding: 0px; color: #000000; font-family: 微软雅黑; line-height: normal; background-color: #ffffff; "><span style="font-size: 12pt; ">使用直接下载路径的方法</span></h2><p style="padding: 0px; color: #000000; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-color: #ffffff; ">这个方法也是之前就有的&#8212;&#8212;就是直接使用Chrome扩展的实际下载路径：将Chrome扩展&#8220;当作&#8221;一个可下载文件下载，由于Chrome自动识别crx文件为扩展安装文件，所以也就实现了扩展自动安装。</p><h3 style="margin: 15px auto 2px; padding: 0px; color: #000000; font-family: 微软雅黑; line-height: normal; background-color: #ffffff; "><span style="font-size: 12pt; ">具体方法</span></h3><p style="padding: 0px; color: #000000; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-color: #ffffff; ">用Chrome扩展的ID替换实际下载地址：</p><blockquote style="margin: 20px 0px; padding: 20px 50px; background-image: url(http://common.cnblogs.com/Skins/iMetro_HD/images/quote.png); background-color: #f0f0f0; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-position: -75px -20px; background-repeat: no-repeat no-repeat; "><p style="padding: 0px; ">https://clients2.google.com/service/update2/crx?response=redirect&amp;x=id%3D&#8230;&#8230;%26uc</p></blockquote><p style="padding: 0px; color: #000000; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-color: #ffffff; ">&#8220;&#8230;&#8230;&#8221;就是Chrome扩展的ID。<br style="margin: 0px; padding: 0px; " />以AdBlock扩展为例，AdBlock扩展的Chrome Web Store页面为：</p><blockquote style="margin: 20px 0px; padding: 20px 50px; background-image: url(http://common.cnblogs.com/Skins/iMetro_HD/images/quote.png); background-color: #f0f0f0; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-position: -75px -20px; background-repeat: no-repeat no-repeat; "><p style="padding: 0px; ">https://chrome.google.com/webstore/detail/gighmmpiobklfepjocnamgkkbiglidom?hl=zh-cn&amp;utm_source=chrome-ntp</p></blockquote><p style="padding: 0px; color: #000000; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-color: #ffffff; ">其中的&#8220;gighmmpiobklfepjocnamgkkbiglidom&#8221;就是AdBlock的唯一ID号，替换上面地址中的&#8220;&#8230;&#8230;&#8221;得到AdBlock扩展的实际下载地址为：</p><blockquote style="margin: 20px 0px; padding: 20px 50px; background-image: url(http://common.cnblogs.com/Skins/iMetro_HD/images/quote.png); background-color: #f0f0f0; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-position: -75px -20px; background-repeat: no-repeat no-repeat; "><p style="padding: 0px; ">https://clients2.google.com/service/update2/crx?response=redirect&amp;x=id%3Dgighmmpiobklfepjocnamgkkbiglidom%26uc</p></blockquote><p style="padding: 0px; color: #000000; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-color: #ffffff; ">在Chrome中直接打开这个地址就行了。</p><hr style="margin: 0px; padding: 0px; color: #000000; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-color: #ffffff; " /><p style="padding: 0px; color: #000000; font-family: 微软雅黑; font-size: 14px; font-weight: normal; line-height: normal; background-color: #ffffff; ">&#8220;正在检查&#8221;的原因似乎并不明确，使用直接下载地址的方法也只能是临时。</p><span style="font-size: 10pt; "><br /></span></a></h1><img src ="http://www.cppblog.com/flyinghare/aggbug/186686.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2012-08-08 21:46 <a href="http://www.cppblog.com/flyinghare/archive/2012/08/08/186686.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>跑步的好处</title><link>http://www.cppblog.com/flyinghare/archive/2012/05/15/174954.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Tue, 15 May 2012 03:36:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2012/05/15/174954.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/174954.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2012/05/15/174954.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/174954.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/174954.html</trackback:ping><description><![CDATA[<span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">1.告别臃肿身材。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">许多人开始跑步就是因为减肥，跑步确实减肥的最好运动方式，跑步每分钟比起其他运动燃烧更多的卡路里。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">2.防止你的骨骼，肌肉退化。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">我们的骨骼是和你的身体需求相互协调的。长期坐在显示器前的我们让我们的骨骼越来越脆弱。而长期的，经常的运动会使你的骨骼保持健康。更进一步说就是防止我们身体内部老化的更快。经常的高强度锻炼，例如跑步，被证明可以促进人体荷尔蒙的生长，荷尔蒙就是那些名人为了看起来更年轻而持续注射的药剂。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">3.抵抗疾病&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">跑步可以降低得中风和乳腺癌的风险。经常的跑步已经成为医生对那些容易引发或在已经处在早期的骨质疏松，糖尿病，高血压病人的治疗建议。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">4.维持并提高总体的身体水平。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">跑步是是人们可以采取的最好的锻炼身体的运动。它可以提高胆固醇,降低血液凝块的危险，锻炼你的50%的经常处于闲置状态的肺。跑步还可以通过增加你的淋巴细胞来增强你的免疫力。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">5.让你更加自信。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">慢跑像其他一些单人运动一样，它可以增强你的自信心。跑步让你完成一次又一次的尝试，让你变得更强大，更加肯定自己。他让你真实的越过某个山峰，穿过某个障碍.在意识到你的身体已经更加强壮，更加有用，你会得到被赋予力量和自由的感觉。自信更是那些通过跑步成功的减肥并得到自己心中理想身材的跑步者的宝贵财富。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">6.放松自己，减轻压力。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">慢跑可以转移聂注意力，沐浴在路旁的风景中，你的烦恼一定会消失殆尽。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">长跑适合那些正处在一堆头疼，恼人的烦心事的人。还有比在两个小时的长跑中，清理的的头脑、舒缓自己的神经更好的主意了吗。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">如果你此时觉得异常压抑，何不快跑一下呢，之后你会一个好的心情。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">7.著名的&#8220;跑步者高峰体验&#8221;&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">包括释放压力，慢跑被证明提高你的心态。跑步，特别在户外和旅行中,会使身体释放一种物质让你产生一种幸福愉悦感（跑步者高峰体验）或者就是快乐的感觉。跑步已经被采用了多年来治疗临床抑郁症，上瘾等。更少的压力，更少的压抑，更少的疲劳，更少的混乱，经过一段时间的经常跑步，病人很快就有了变化。跑步让他们有了注意的对象，让他们看到了除了他们消极的状态和沉溺的事务，还有一些美好的东西的存在。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">8.锻炼你的头脑。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">像对你的身体有所帮助一样，跑步同样对你的头脑很有帮助。通过在跑步中克服一系列的障碍，你学会了专注和决心.在经历那些你几乎要放弃的长跑或其他项目后你会发现：你在跑步过程中产生的意志和体魄的增强让你在其他方面有着同样的专注和决心。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">9.增强合作精神。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">又是一个非常值得去做的好处。这点好处或许让很多人感到惊奇，因为人们认为跑步不可能得到这种益处，仅仅由于跑步是单人运动。但是跑步确实有时涉及到互相合作。旅行跑步，特别是在那些路况不好的地方，需要极大的合作意识。这些路面经常会有一些 障碍如石头、灌木让跑步进行的很困难。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">10.随时随地，简单。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">不是很多的运动可以在任何地方，几乎不需要设备的。我敢肯定古代希腊人会争辩说甚至是鞋子和衣服也不需要。今天，我们只是需要一双好点的跑步鞋然后就可以出发了。从市中心到郊区,整个世界的地方等待你的探索。经常出差吗？你的旅行箱里肯定会有空间来装你的运动鞋的。这个世界就是你的健身房，去再次发现它吧。&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">Here are some tips for how to make running a practice:&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">Be consistent in your running program. Plan your weekly workout schedule and stick to it. This will teach you persistence.&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">Know which focuses you'll use during every run. This will teach you planning and mindfulness, and improve your mind/body connection.&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">Constantly practice relaxing your muscles. This will help to relieve tension and train you to relax no matter what activity you're doing.&nbsp;</span><br style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; " /><span style="color: #111111; font-family: Arial, Helvetica, sans-serif; font-size: 13px; background-color: #ffffff; ">At the end of your run, spend a few minutes doing an "end-of-run review." Ask yourself how well you did with keeping your focuses, how your body felt during the run. What did you come away with that will help your next run? Then, the next time you go out for a run, you'll have something to work on that you brought forward from your last run. In this way you'll build a healthy, growing and sustainable running program.&nbsp;</span>&nbsp;<br />转自：<a href="http://www.douban.com/group/topic/20749798/">http://www.douban.com/group/topic/20749798/</a><img src ="http://www.cppblog.com/flyinghare/aggbug/174954.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2012-05-15 11:36 <a href="http://www.cppblog.com/flyinghare/archive/2012/05/15/174954.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Windows Server 2008 R2修改远程桌面连接数</title><link>http://www.cppblog.com/flyinghare/archive/2012/04/19/171955.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Thu, 19 Apr 2012 02:31:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2012/04/19/171955.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/171955.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2012/04/19/171955.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/171955.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/171955.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; ">计算机---属性---远程设置---勾选"允许运行任意版本远程桌面的计算机连接(较不安全)"&#8230;&#8230;</p><div id="artibody" style="color: #333333; font-family: Arial; line-height: 26px; text-align: left; background-color: #ffffff; "><div id="content"><div></div><p>　　<strong>第一步：开启远程桌面:</strong></p><p>　　计算机---属性---远程设置---勾选"允许运行任意版本远程桌面的计算机连接(较不安全)"</p><p>　　<strong>第二步：设置远程桌面连接最大数量</strong></p><p>　　控制面板--&gt;管理工具--&gt;远程桌面服务--&gt;远程桌面会话主机设置--&gt;去掉"限制每个用户只能进行一个会话"勾选,最后双击连接中的RDP-Tcp---网络适配器--最大连接数 修改为2 此时的同时远程桌面连接的数量即设置为2。</p><p>&nbsp;</p><p>=================================================================================</p><p><span style="background-color: #c7edcc; ">作在工作中，经常需要远程连接到服务器上，然而在公司里，老总、同事都需要连接到服务器上的，而默认的Win2003操作系统最大连接数是2，这样一来，问题也就来了，常常遇到&#8220;终端服务器超出最大连接数&#8221;，导致无法正常登陆服务器。下面讲解在网上流传的几种方法，来解决这一问题。</span></p><p><span style="background-color: #c7edcc; ">解决方法一：用&#8220;注销&#8221;方式退出远程桌面，而不是直接关闭窗口；</span></p><p><span style="background-color: #c7edcc; ">解决方法二：踢出已经断开的连接用户；</span></p><p><span style="background-color: #c7edcc; ">1、首先通过各种方法连接到服务器上（telnet）；</span></p><p><span style="background-color: #c7edcc; ">2、上去后，查看登陆用户列表。输入命令：query user；</span></p><p><span style="background-color: #c7edcc; ">这样你就可以看出有何不同来啦，可以根据你的具体情况而定的。ID为0的用户就是本地登陆的，而在State中看提示，当提示为已断开，则说明用户已经断开还占用着系统资源和通道，这样就可以把该用户踢掉。输入logoff ID，即踢除相应ID的用户。</span></p><p><span style="background-color: #c7edcc; ">解决方法三：限制已断开连接的会话存在时间；（推荐）</span></p><p><span style="background-color: #c7edcc; ">一般情况下，我们在维护远程服务器时，不可能长时间在线，但是系统默认的却是只要登录就不再断开。因此，我们可以修改这一默认设置，给它指定一个自动断开的时间即可。</span></p><p><span style="background-color: #c7edcc; ">可以在 Windows 2003 服务器上通过组策略中设置一下来解决问题：单击&#8220;开始 &#8594; 运行&#8221;，输入&#8220;gpedit.msc&#8221;，回车后打开组策略窗口，然后依次定位到&#8220;计算机配置 &#8594; 管理模板 &#8594; Windows 组件 &#8594; 终端服务 &#8594; 会话&#8221;，然后在右侧窗口中双击&#8220;为断开的会话设置时间限制&#8221;，在打开的窗口中将&#8220;结束断开连接的会话&#8221;时间设置为5分钟，或者设置为空闲就断开。或在远程服务器上打开&#8220;运行&#8221;窗口，输入&#8220;tscc.msc&#8221;连接设置窗口。然后双击&#8220;连接&#8221;项右侧的&#8220;RDP-Tcp&#8221;，切换到&#8220;会话&#8221;标签，选中&#8220;替代用户设置&#8221;选项，再给&#8220;结束已断开的会话&#8221;设置一个合适的时间即可。</span></p><p><span style="background-color: #c7edcc; ">解决方法四：增加连接数量，即设置最大连接数再多些；</span></p><p><span style="background-color: #c7edcc; ">默认情况下允许远程终端连接的数量是2个用户，我们可以根据需要适当增加远程连接同时在线的用户数。</span></p><p><span style="background-color: #c7edcc; ">单击&#8220;开始&#8594;运行&#8221;，输入 &#8220;gpedit.msc&#8221;打开组策略编辑器窗口，依次定位到&#8220;计算机配置 &#8594; 管理模板 &#8594; Windows 组件 &#8594; 终端服务&#8221;，再双击右侧的&#8220;限制连接数量&#8221;，将其TS允许的最大连接数设置大一些即可。</span></p><p><span style="background-color: #c7edcc; ">经过上面两个配置（方法三&amp;方法四），基本上就可以保证远程终端连接时不再受限。但仍有人反映，当前同时只有一个用户进行连接，却提示超出最大允许链接数，这又是什么原因呢？出现这种情况是因为操作不当所造成的。在上一个帐户登录远程桌面后退出时，没有采用注销的方式，而是直接关闭远程桌面窗口，那么导致该会话并没有被释放，而是继续保留在服务器端，占用了连接数，这样就会影响下一个用户的正常登录了。</span></p><p><span style="background-color: #c7edcc; ">解决方法五：限制用户会话数；</span></p><p><span style="background-color: #c7edcc; ">对Terminal Services进行限制，使得一个用户仅仅能够连接一次。对于Windows Server 2003，请在Terminal Services Configuration（Terminal Services配置）中将&#8220;限制每位用户只有拥有一个会话&#8221;（Restrict each user to one session）设置为&#8220;是&#8221;（Yes）。此外，您可以将&#8220;限制终端服务用户使用单个远程会话&#8221;组策略设置为&#8220;启用&#8221;。</span></p><p><span style="background-color: #c7edcc; ">注意：版本不一样解决的方法有异！</span></p><p><span style="background-color: #c7edcc; ">A：这是因为Windows 2003中设置了最大允许连接数限制，而你每次连接后可能没有注销而是直接关闭，导致连接数超过了最大连接数。你可以在Windows 2003 服务器上通过组策略中设置一下来解决问题：单击&#8220;开始&#8594;运行&#8221;，输入 &#8220;gpedit.msc&#8221;，回车后打开组策略窗口，然后依次定位到&#8220;计算机配置 &#8594; 管理模板 &#8594; 终端服务 &#8594; 会话&#8221;，然后在右侧窗口中双击&#8220;为断开的会话设置时 间限制&#8221;，在打开的窗口中将&#8220;结束断开连接的会话&#8221;时间设置为5分钟。最好的解决方法还是你每次断开连接时通过注销的方式。</span></p><p><span style="background-color: #c7edcc; ">B：经常多人管理服务器的朋友一定遇到过当自己终端连接远程计算机的时候却提示&#8220;终端连接超出了最大连接&#8221;的提示吧？这是因为windows2003仅支持2个终端用户的登陆。当这种情况出现后，多数人选择的是给机房打电话进行重启服务器。可是带来的损失也是显而 易见的。那么我们有什么办法来解决呢？方法当然是有的。我们只需要在一台2003的机器上运行&#8220;tsmmc.msc&#8221;就可以打开远程桌面连接，在这里我们 添加一个新的连接，输入对方的IP地址帐号和密码后就可以成功登陆到对方的桌面中，这时可以再踢下一个用户。就可以解决终端连接数超过最大的问题。</span></p><p><span style="background-color: #c7edcc; ">C：开始 &#8594; 控制面版 &#8594; 授权里面更改连接数。</span></p><p>&nbsp;</p><p><span style="background-color: #c7edcc; ">在命令行：&nbsp;<br />mstsc /console /v:你的服务器IP:远程端口</span></p><p><span style="background-color: #c7edcc; ">例如 :mstsc /console /v:222.222.215.222:3389</span></p><p><span style="background-color: #c7edcc; ">win2K/win2003终端服务器超出最大允许连接数解决之道全攻略&nbsp;<br />原因:用远程桌面链接登录到终端服务器时经常会遇到&#8220;终端服务器超出最大允许链接数&#8221;诸如此类错误导致无法正常登录终端服务器，引起该问题的原因在于终端服务的缺省链接数为2个链接，并且当登录远程桌面后如果不是采用注销方式退出，而是直接关闭远程桌面窗口，那么实际上会话并没有释放掉，而是继续保留在服务器端，这样就会占用总的链接数，当这个数量达到最大允许值时就会出现上面的提示。&nbsp;<br />如何避免？&nbsp;<br />一、用注销来退出远程桌面而不是直接关闭窗口二、限制已断开链接的会话存在时间&nbsp;<br />1、从终端服务配置中修改&nbsp;<br />运行－Tscc.msc(终端服务配置)－连接－双击RDP-Tcp或右击－属性－会话－选中第一个的替代用户设置(O)－结束已断开的会话［将默认值&#8220;从不&#8221;改为一个适当的时间，比如30分钟］&nbsp;<br />2、从组策略修改&nbsp;<br />开始－运行－gpedit.msc－计算机配置－管理模板－windows组件－终端服务－会话&nbsp;<br />右边窗口选择 为断开的会话设置时间限制 －选择已启用，选择一个时间&nbsp;<br />三、增加最多链接数&nbsp;<br />1、从终端服务配置中修改：运行－Tscc.msc(终端服务配置)－连接－双击RDP-Tcp或右击－属性，选择&#8220;网卡&#8221;选项卡－修改&#8220;最大连接数&#8221;改成你所需的值，当然这个值不也能太大，否则会占用较多的系统资源。不过这里修改的值好像不起作用，设置成无限制时照样还是会出现本文所说的情况。&nbsp;&nbsp;&nbsp;<br />2、组策略级别要高于终端服务配置，当启用组策略后终端服务配置中的相应选项会变成灰色不可修改&nbsp;<br />运行－gpedit.msc－计算机配置－管理模板－Windows组件－终端服务&nbsp;<br />双击右边的&#8221;限制连接数量&#8220;－选择&#8221;已启用&#8220;－填入允许的最大连接数&nbsp;<br />四、改变远程终端模式&nbsp;<br />打开&#8220;控制面板&#8221;，双击&#8220;添加删除程序&#8221;，单击&#8220;添加删除Windows组件&#8221;,&#8220;组件&#8221;，在Windows组件向导对话框中选中&#8220;终端服务&#8221; , &#8220;下一步&#8221;,&#8220;应用服务器&#8221;,&#8220;下一步&#8221;，然后按照提示即可改变终端服务的模式。&nbsp;&nbsp;&nbsp;<br />Windows 2000终端服务有2种运行模式: 远程管理模式和应用程序服务器模式。远程管理模式允许系统管理员远程管理服务器，而且只允许2个终端会话同时登录终端服务器。应用程序服务器模式允许用户运行一个以上应用程序，允许多个用户从终端登录访问服务器。但是，应用终端服务的用户必须有终端服务授权，即必须在90天之内在这个域或工作组中设置终端服务授权服务器，否则用户需删除应用程序，然后再重新安装。&nbsp;<br />五、修改本地安全策略&nbsp;<br />控制面板&gt;&gt;管理工具&gt;&gt;本地安全策略&gt;&gt;本地策略&gt;&gt;安全选项&gt;&gt;&nbsp;<br />1、先找到&gt;&gt;Microsoft网络服务器:在挂起会话之前所需的空闲时间&nbsp;<br />默认为:15分钟,改为自己所需要的时间(就是登陆后无动作空闲超过多少时间后自动断开)&nbsp;<br />2、然后找到&gt;&gt;网络安全:在超过登录时间后强制注销。默认为:已禁用,一定要改为:已启用&nbsp;<br />如果已经发生解决办法：&nbsp;<br />1、首先你可以telnet到此主机上(不管你用哪种方法)，当然如果能直接操作机器更好，不过直接操作就不必用命令行了，那当然是知道机器超级管理员的密码的情况下，可以使用OpenTelnet来打开远程服务器的Telnet端口。&nbsp;<br />2、Telnet上去后,先看登陆的用户：&nbsp;<br />输入命令：query user&nbsp;<br />系统返回：&nbsp;<br />C:&gt;query user&nbsp;<br />USERNAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SESSIONNAME&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp;&nbsp; STATE&nbsp;&nbsp;&nbsp;&nbsp; IDLE TIME&nbsp;&nbsp;&nbsp; LOGON TIME&nbsp;<br />k12update&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; 运行中&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-3-14 14:57&nbsp;<br />此时可以看出的可能都不一样，根据具体情况而定。&nbsp;<br />ID 0 的用户是本地登陆的,ID 1 和 ID 12是3389登陆的用户,前者在运行中，后者已经断开了,但是断开了仍然占用系统资源和通道，我们要把它踢掉。如下进行操作即可。&nbsp;<br />输入命令：logoff 1&nbsp;<br />3、如果服务器关闭了telnet功能（这是默认的），还可以通过SqlServer的xp_cmdshell扩展存储过程，使用格式：master.dbo.xp_cmdshell '命令内容'，其余可参考第二步。此方式要求有访问xp_cmdshell的权限&nbsp;<br />上面的办法基本没有用</span></p><p><span style="background-color: #c7edcc; ">[原创经典]&#8220;终端服务器超出了最大允许连接数&#8221;的解决办法</span></p><p><span style="background-color: #c7edcc; ">2007-04-25 17:13</span></p><p><span style="background-color: #c7edcc; ">现象及原因：用远程桌面连接登录到终端服务器时经常会遇到&#8220;终端服务器超出最大允许连接数&#8221;诸如此类错误导致无法正常登录终端服务器，引起该问题的原因在于Windows Server 2003中设置终端服务的缺省连接数为2个链接，并且当登录远程桌面后如果不是采用注销方式退出，而是直接关闭远程桌面窗口，那么实际上会话并没有释放掉，而是继续保留在服务器端，这样就会占用总的链接数，当这个数量达到最大允许值时就会出现上面的提示。&nbsp;<br />解决方案：&nbsp;<br />法一：用&#8220;注销&#8221;方式退出远程桌面而不是直接关闭窗口&nbsp;<br />法二：踢出已经断开连接的用户&nbsp;<br />1、首先telnet到此主机上(不管你用什么方法)，当然如果能直接操作机器更好，不过直接操作就不必用命令行了，用控制台更直观(略过)。&nbsp;<br />2、Telnet上去后,先看登陆的用户：&nbsp;<br />输入命令：query user 系统返回：&nbsp;<br />用户名Username&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 会话名Session Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp; 状态State&nbsp;&nbsp;&nbsp; 空闲时间Idle Time&nbsp;&nbsp;&nbsp;&nbsp; 登录时间Logon Time&nbsp;<br />administrator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; 运行中&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-1-12 10:24&nbsp;<br />lucy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; 唱片&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 无&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-1-12 10:35&nbsp;<br />&gt;administrator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rdp-tcp#35&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; 已断开&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-1-25 18:09&nbsp;<br />此时可以看出的可能跟我的不一样，根据你的具体情况而定。&nbsp;<br />ID 0 的用户是本地登陆的&nbsp;<br />ID 1 和 ID 2是3389登陆的用户，前者在运行中， 后者已经断开了，但是断开了仍然占用系统资源和通道，我们要把它踢掉，如下进行操作即可。&nbsp;<br />输入命令：logoff 1&nbsp;<br />再看看&nbsp;<br />C:\Documents and Settings\Administrator.AD&gt;query user&nbsp;<br />用户名Username&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 会话名Session Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp; 状态State&nbsp;&nbsp;&nbsp; 空闲时间Idle Time&nbsp;&nbsp;&nbsp;&nbsp; 登录时间Logon Time&nbsp;<br />administrator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp; 运行中&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-1-12 10:24&nbsp;<br />&gt;administrator&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rdp-tcp#35&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp; 已断开&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-1-25 18:09&nbsp;<br />3、如果服务器关闭了telnet功能（这是默认的），还可以通过SqlServer的xp_cmdshell扩展存储过程，使用格式：master.dbo.xp_cmdshell ''''命令内容''''，其余可参考第二步。此方式要求有访问xp_cmdshell的权限。&nbsp;<br />法三（最佳方法－推荐）：限制已断开链接的会话存在时间&nbsp;<br />一般情况下，我们在维护远程服务器时，不可能长时间在线，但是系统默认的却是只要登录就不再断开。因此，我们可以修改这一默认设置，给它指定一个自动断开的时间即可。&nbsp;<br />可以在Windows 2003 服务器上通过组策略中设置一下来解决问题：单击"开始&#8594;运行"，输入"gpedit.msc"，回车后打开组策略窗口，然后依次定位到"计算机配置&#8594;管理模板&#8594;Windows 组件&#8594;终端服务&#8594;会话"，然后在右侧窗口中双击"为断开的会话设置时间限制"，在打开的窗口中将"结束断开连接的会话"时间设置为5分钟，或者设置为空闲就断开。&nbsp;<br />或&nbsp;<br />在远程服务器上打开&#8220;运行&#8221;窗口，输入&#8220;tscc.msc&#8221;连接设置窗口。然后双击&#8220;连接&#8221;项右侧的&#8220;RDP-Tcp&#8221;，切换到&#8220;会话&#8221;标签，选中&#8220;替代用户设置&#8221;选项，再给&#8220;结束已断开的会话&#8221;设置一个合适的时间即可。&nbsp;<br />法四：增加连接数量，即设置可连接的数量多些&nbsp;<br />默认情况下允许远程终端连接的数量是2个用户，我们可以根据需要适当增加远程连接同时在线的用户数。&nbsp;<br />单击&#8220;开始&#8594;运行&#8221;，输入&#8220;gpedit.msc&#8221;打开组策略编辑器窗口，依次定位到&#8220;计算机配置&#8594;管理模板&#8594;Windows 组件&#8594;终端服务&#8221;，再双击右侧的&#8220;限制连接数量&#8221;，将其TS允许的最大连接数设置大一些即可。&nbsp;<br />经过上面两个配置(法三&amp;法四)，基本上就可以保证远程终端连接时不再受限。但仍有人反映，当前同时只有一个用户进行连接，却提示超出最大允许链接数，这又是什么原因呢？出现这种情况是因为操作不当所造成的。在上一个帐户登录远程桌面后退出时，没有采用注销的方式，而是直接关闭远程桌面窗口，那么导致该会话并没有被释放，而是继续保留在服务器端，占用了连接数，这样就会影响下一个用户的正常登录了。&nbsp;<br />法五：限制用户会话数&nbsp;<br />对Terminal Services进行限制，使得一个用户仅仅能够连接一次&nbsp;<br />对于Windows Server 2003，请在Terminal Services Configuration（Terminal Services配置）中将&#8220;限制每位用户只有拥有一个会话&#8221;（Restrict each user to one session）设置为&#8220;是&#8221;（Yes）。此外，您可以将&#8220;限制终端服务用户使用单个远程会话&#8221;组策略设置为&#8220;启用&#8221;。</span></p></div></div>转自：<a href="http://blog.csdn.net/yl_99/article/details/7218990">http://blog.csdn.net/yl_99/article/details/7218990</a><img src ="http://www.cppblog.com/flyinghare/aggbug/171955.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2012-04-19 10:31 <a href="http://www.cppblog.com/flyinghare/archive/2012/04/19/171955.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>VMware虚拟机出现Reason: Failed to lock the file</title><link>http://www.cppblog.com/flyinghare/archive/2012/04/05/170118.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Thu, 05 Apr 2012 01:52:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2012/04/05/170118.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/170118.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2012/04/05/170118.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/170118.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/170118.html</trackback:ping><description><![CDATA[<span style="font-size: 24pt; ">方法1</span>（转自：<a href="http://blog.chinaunix.net/uid-24250828-id-3012727.html">http://blog.chinaunix.net/uid-24250828-id-3012727.html</a>&nbsp;）<br /><br /><br style="font-family: 宋体, Arial; font-size: 12px; line-height: 15px; background-color: #fffcf3; " /><span style="font-size: medium; line-height: 1.5; background-color: #fffcf3; font-family: 宋体, Arial; ">打开VMware出现Cannot open the disk *.vmdk or one of the snapshot disks it depends on.Reason: Failed to lock the file.错误的解决办法！</span><br /><div id="detail" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 宋体, Arial; font-size: 12px; line-height: 1.3; background-color: #fffcf3; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; text-indent: 2em; "><span style="line-height: 1.5; font-size: medium; ">&nbsp;&nbsp; 今天我公司做的虚拟化服务器出现故障意外重启了，主系统启动之后，在启动VMware虚拟机的时候出现了Cannot open the disk '*.vmdk' or one of the snapshot disks it depends on.Reason: Failed to lock the file.的错误，一个虚拟机无法启动将影响到很多用户的使用，所以我马上开始寻找解决Reason: Failed to lock the file的办法！于是我到百度搜索了一下这个错误的具体原因，搜索结果中给出了两种解决办法！</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; text-indent: 2em; "><span style="line-height: 1.5; font-size: medium; ">解决办法一：<br />&nbsp;&nbsp; 1、在VMware该虚拟机路径下的所有.lck文件和文件夹下删除或迁移至其它目录，一般就可以解决了。<br />&nbsp;&nbsp; 2、如果再次启动VMware的Windows Vista系统失败，尝试右键虚拟机出错的系统-&gt;Settings-&gt;Hardware-&gt;Hard Disk-&gt;Utilities-&gt;Map-&gt;映射虚拟硬盘到Z:/<br />&nbsp;&nbsp; 3、断开虚拟硬盘，重新加载，启动。系统就可以正常启动了</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; text-indent: 2em; "><span style="line-height: 1.5; font-size: medium; ">经实验此办法以失败结 束。如果有遇到Cannot open the disk '*.vmdk' or one of the snapshot disks it depends on.Reason: Failed to lock the file错误的朋友不妨也试一下。如果您实验成功了，请给我们留言，以便我们进行更好的技术交流</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; text-indent: 2em; "><span style="line-height: 1.5; font-size: medium; ">解决办法二：</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; text-indent: 2em; "><span style="line-height: 1.5; font-size: medium; ">&nbsp;&nbsp; 使用记事本打开*.VMX文件上加上一行代码disk.locking = "FALSE"，重新启动该虚拟机。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; text-indent: 2em; "><span style="line-height: 1.5; font-size: medium; ">使用方法二，问题得到 解决，重新启动VMware正常启动，不会再出现Cannot open the disk '*.vmdk' or one of the snapshot disks it depends on.Reason: Failed to lock the file.错误。</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; text-indent: 2em; "><span style="line-height: 1.5; font-size: medium; ">希望各位从事虚拟化的朋友能有所帮助，也欢迎各位来我站踊跃投稿！</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; text-indent: 2em; "><span style="line-height: 1.5; font-size: medium; "><img title="VMware虚拟机出现Reason: Failed to lock the file（转） - 呱牛之家 - 呱牛之家的博客" src="http://b.bst.126.net/common/portrait/r/preview/r8.gif" alt="VMware虚拟机出现Reason: Failed to lock the file（转） - 呱牛之家 - 呱牛之家的博客" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; max-width: 650px; " /><span style="line-height: 1.5; font-size: x-small; ">感谢作者的分享，偶使用方法1第1步就解决了</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; text-indent: 2em; ">&nbsp;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; font-size: 14px; "><span style="line-height: 1.5; font-size: medium; ">问题出现的原因：<br />虚拟磁盘(.vmdk)本身有一个磁盘保护机制，为 了防止多台虚拟机同时访问同一个虚拟磁盘(.vmdk)带来的数据丢失和性能削减方面的隐患，每次启动虚拟机的时候虚拟机会使用扩展名为.lck（磁盘 锁）文件对虚拟磁盘(.vmdk)进行锁定保护。当虚拟机关闭时.lck（磁盘锁）文件自动删除。但是可能由于您非正常关闭虚拟机，这时虚拟机还没来得及 删除您系统上的.lck（磁盘锁）文件，所以当下次您启动虚拟机的时候出现了上述错误。<br /><br /><br /></span></p></div><span style="font-size: 24pt; ">方法2</span>（转自：<a href="http://www.ardamis.com/2009/11/20/vmware-cannot-open-the-disk-xxxxxx-vmdk-or-one-of-the-snapshot-disks-it-depends-on/">http://www.ardamis.com/2009/11/20/vmware-cannot-open-the-disk-xxxxxx-vmdk-or-one-of-the-snapshot-disks-it-depends-on/</a>&nbsp;）<br /><div post="" type-post="" status-publish="" format-standard="" hentry="" category-nonsense="" category-tutorials="" tag-microsoft=""  tag-troubleshooting"="" id="post-402" itemscope="" itemtype="http://schema.org/BlogPosting" style="color: #352c1d; font-family: 'Segoe UI', 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px; background-color: #ffffff; "><h1>VMware &#8220;Cannot open the disk &#8216;XXXXXX.vmdk&#8217; or one of the snapshot disks it depends on.&#8221;</h1><div itemprop="articleBody"><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 1.5; ">From time to time, I want to copy just the minimum files for a VMware virtual machine: the two .vmdk files and the .vmx file. After moving those files to a new location or deleting a snapshot file, attempting to boot the virtual machine returns the following error message:</p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 1.5; ">Cannot open the disk &#8216;XXXXXX.vmdk&#8217; or one of the snapshot disks it depends on.<br />Reason: The system cannot find the file specified.</p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 1.5; ">I&#8217;ve found that following the steps below fixes the problem and allows me to boot the virtual machine as it existed at the time of creation. DO NOT USE these steps if you need to retain any changes to the machine:</p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 1.5; ">Open the *.vmx file in a text editor and find the line that refers to the old snapshot file, which will look something like:<br />scsi0:0.fileName = &#8220;XXXXXX-000002.vmdk&#8221;<br />or<br />ide0:0.fileName = &#8220;XXXXXX-000002.vmdk&#8221;</p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 1.5; ">Change the value to the filename of the ~1kb .vmdk file (which happens to be the same as the name of the VM). For example, if your virtual machine was named &#8220;Windows XP Professional&#8221;, the line would read:</p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 1.5; ">scsi0:0.fileName = &#8220;Windows XP Professional.vmdk&#8221;</p><p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; line-height: 1.5; ">Power on the VM. It should boot normally, but because the snapshot file is missing, the machine will boot to an earlier state.</p></div><p>&nbsp;</p><div vcard"="" style="border-top-color: #bcb19f; border-right-color: #bcb19f; border-bottom-color: #bcb19f; border-left-color: #bcb19f; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; margin-top: 30px; margin-right: 0px; margin-bottom: 30px; margin-left: 0px; padding-top: 30px; padding-bottom: 30px; font-size: 12px; "><p>This entry was written by&nbsp;<a href="http://www.ardamis.com/about/" rel="author" style="color: #fd6512; cursor: pointer; text-decoration: none; "><span fn"="" itemprop="author">Oliver Baty</span></a>. It was posted on&nbsp;<span itemprop="dateCreated" title="2009-11-20">20 November 2009</span>&nbsp;and last updated on&nbsp;<span itemprop="dateModified" title="2010-07-01">1 July 2010.</span>&nbsp;It is categorized under&nbsp;<span itemprop="keywords"><a href="http://www.ardamis.com/category/nonsense/" title="View all posts in Nonsense" rel="category tag" style="color: #fd6512; cursor: pointer; text-decoration: none; ">Nonsense</a>,&nbsp;<a href="http://www.ardamis.com/category/tutorials/" title="View all posts in Tutorials" rel="category tag" style="color: #fd6512; cursor: pointer; text-decoration: none; ">Tutorials</a></span>&nbsp;with tags&nbsp;<span itemprop="keywords"><a href="http://www.ardamis.com/tag/microsoft/" rel="tag" style="color: #fd6512; cursor: pointer; text-decoration: none; ">Microsoft</a>,&nbsp;<a href="http://www.ardamis.com/tag/troubleshooting/" rel="tag" style="color: #fd6512; cursor: pointer; text-decoration: none; ">troubleshooting</a></span>.</p></div></div><div id="comments" style="float: left; padding-right: 47px; width: 549px; color: #352c1d; font-family: 'Segoe UI', 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px; background-color: #ffffff; "><div><h3>19 Responses to &#8220;VMware &#8220;Cannot open the disk &#8216;XXXXXX.vmdk&#8217; or one of the snapshot disks it depends on.&#8221;&#8221;</h3></div></div><img src ="http://www.cppblog.com/flyinghare/aggbug/170118.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2012-04-05 09:52 <a href="http://www.cppblog.com/flyinghare/archive/2012/04/05/170118.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>跨平台同步软件——Sugarsync</title><link>http://www.cppblog.com/flyinghare/archive/2012/01/30/164664.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Sun, 29 Jan 2012 16:41:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2012/01/30/164664.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/164664.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2012/01/30/164664.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/164664.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/164664.html</trackback:ping><description><![CDATA[<div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; font: normal normal normal 14px/1.5em 'Helvetica Neue', Helvetica, sans-serif; color: #555555; font-family: 'Helvetica Neue', Helvetica, sans-serif; ">dropbox被封了，正好这几天因为实验室电脑和笔记本之间的文件同步问题发愁想找个好的同步软件，又正好<a href="http://www.hexilou.com/" target="_blank" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #6a0888; text-decoration: none; ">@hexilou</a>同学发来了Sugarsync这个应用的邀请，于是测试了一下，感觉不错。在dropbox不能使用的一段时间里，逐步探索同步文件怎么能促进工作和学习，也就只有靠这个Sugarsync了。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; font: normal normal normal 14px/1.5em 'Helvetica Neue', Helvetica, sans-serif; color: #555555; font-family: 'Helvetica Neue', Helvetica, sans-serif; ">Sugarsync有很多语言版本，看起来还是挺强大的软件，支持PC、mac、手机多平台的文件同步。目前只测试了mac和PC之间的同步，效果良好。同步文件夹的操作非常简单，先选择需要同步的文件夹，然后等待上传，再到另一台电脑下载就可以了。速度不是很快，我选了实验室的项目和这学期学习资料的两个文件夹，总共1G多，传了2个多小时还没传完，不过同步也都是第一次慢，以后应该就快了。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; font: normal normal normal 14px/1.5em 'Helvetica Neue', Helvetica, sans-serif; color: #555555; font-family: 'Helvetica Neue', Helvetica, sans-serif; ">文件同步和共享应该是这个软件的两个主要功能。同步的文件到底哪些该同步呢？我觉得是手头上正在做的一些工作，需要经常修改（如果不同步，而是拷来拷去的话，容易引起版本混乱），而已经不常编辑，属于保存状态的文件就不需要同步了（应该做的是备份）。共享其实就是团队合作的时候用了，现在Web2.0里支持共享和协同编辑的应用程序很多，好多人对这种形式的工作挺抵触的，觉得特别不习惯，还是要复制或下载到自己的电脑上，创建另外一个文件，再进行工作。其实云计算的技术、程序方面的东西看起来比较复杂，它的理念还是很容易接受的，现在只要寻找到一个可靠的存储空间，完全不需要很多东西都再出一份单机版。当然，合理备份是需要的。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; font: normal normal normal 14px/1.5em 'Helvetica Neue', Helvetica, sans-serif; color: #555555; font-family: 'Helvetica Neue', Helvetica, sans-serif; ">Sugarsync的同步还是后台自动运行的，这一点也不错，避免我忘记有没有更新文件的版本，不过其实我的文件管理也很混乱，命名啊，目录啊，都在逐步归整，有时候实在归不动了，就扔到一个文件夹里不再管它&#8230;&#8230;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; font: normal normal normal 14px/1.5em 'Helvetica Neue', Helvetica, sans-serif; color: #555555; font-family: 'Helvetica Neue', Helvetica, sans-serif; ">Sugarsync还支持直接获得文件的链接路径，通过路径可以直接下载文件。不知道能不能用于外链图库或其他什么东西。另外这个应用的安全性，看上去还不错，但究竟如何，还需继续关注。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; font: normal normal normal 14px/1.5em 'Helvetica Neue', Helvetica, sans-serif; color: #555555; font-family: 'Helvetica Neue', Helvetica, sans-serif; ">附送一个邀请链接，用这个链接注册，你我都可以获得250M的额外空间。</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; font: normal normal normal 14px/1.5em 'Helvetica Neue', Helvetica, sans-serif; color: #555555; font-family: 'Helvetica Neue', Helvetica, sans-serif; "><a href="http:" target="_blank" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; outline-width: 0px; outline-style: initial; outline-color: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: #6a0888; text-decoration: none; ">https://www.sugarsync.com/referral?rf=oi53mtv7ncjy<br /><br /><br />转自</a>：http://shiun.me/its/web/742</p></div><img src ="http://www.cppblog.com/flyinghare/aggbug/164664.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2012-01-30 00:41 <a href="http://www.cppblog.com/flyinghare/archive/2012/01/30/164664.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>防止艾普宽带弹出窗口</title><link>http://www.cppblog.com/flyinghare/archive/2012/01/18/164351.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Wed, 18 Jan 2012 15:16:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2012/01/18/164351.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/164351.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2012/01/18/164351.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/164351.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/164351.html</trackback:ping><description><![CDATA[自从办了家，使用艾普宽带以来，感觉它的自动弹出广告非常讨厌（即收费还要污染你的眼球，感觉很恶心）。<br /><br />短短的几天，发现了两种弹出窗口的方式：<br />&nbsp; &nbsp; 1、在你要访问的 URL 地址转向到&nbsp;http://union8848.com/ 上的某个页面。并通过参数将用户页面传递给伪装的页面。<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;例如，如果你访问的 ，则被转向后的 URL 可能是：<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;http://union8848.com/redirect8.php?desturl=http://www.baidu.com/&amp;augid1=120117800385.php?julyid=NjJkskljKJasf=MTMy&nbsp;<br /><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;注意以下几项信息（和后面的解决方法有关）：<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;新的域名为&nbsp;union8848.com<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;服务器文件名为&nbsp;redirect8.php，这个是变化的，也可能是redirect7.php 之类的。<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;参数&nbsp;desturl ：用户的真实 URL</div>&nbsp; &nbsp; 2、通过截获用户页面，直接插入 js 代码。<br /><br /><br />对于第1种方式 ，可以采用以下方式解决：<br />&nbsp; &nbsp;1、修改 hosts 文件，将&nbsp;union8848.com 指向 127.0.0.1<br />&nbsp; &nbsp;2、本机架设一个支持 PHP 的 web 服务器，根目录下放置&nbsp;redirect8.php 文件，内容为：<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;?php<div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;header("location:".$_GET['desturl']);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;?&gt;<br /><br />这样，当 URL 被指向&nbsp;union8848.com 时，通过本机转向，自动还原为真实 URL。<br />当然，redirect8.php 文件名可能会变化，因此我们可以将该文件复制多个，例如：redirect1.php，redirect2.php，redirect3.php 。。。</div></div><div></div>&nbsp;<br />如果艾普再出现其他文件，同样按葫芦画瓢。<img src ="http://www.cppblog.com/flyinghare/aggbug/164351.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2012-01-18 23:16 <a href="http://www.cppblog.com/flyinghare/archive/2012/01/18/164351.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>巧替换windows 7中的"宋体 simsun.ttc"</title><link>http://www.cppblog.com/flyinghare/archive/2011/03/07/141298.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Mon, 07 Mar 2011 09:58:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2011/03/07/141298.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/141298.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2011/03/07/141298.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/141298.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/141298.html</trackback:ping><description><![CDATA[<span style="font-family: verdana,sans-serif; font-size: 14px; line-height: 21px;">
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 19px; font-size: small;"><span style="line-height: 19px; font-family: 宋体;">巧替换windows 7中的"宋体 simsun.ttc"</span><span style="line-height: 19px; font-family: 宋体;"></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">最近将本本升级到<span style="line-height: 19px; font-family: 'Times New Roman';">windows&nbsp;7&nbsp;64bits,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">发现系统的对话框字体为宋体</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">还有毛刺</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">看起来非常不舒服</span><span style="line-height: 19px; font-family: 'Times New Roman';">.&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">比</span><span style="line-height: 19px; font-family: 'Times New Roman';">xp&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">的感官都要差多了</span><span style="line-height: 19px; font-family: 'Times New Roman';">.&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">就想着法能修改一把就好</span><span style="line-height: 19px; font-family: 'Times New Roman';">.</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">遇到问题<span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">首先</span><span style="line-height: 19px; font-family: 'Times New Roman';">g</span><span style="line-height: 19px; font-family: 宋体;">一把</span><span style="line-height: 19px; font-family: 'Times New Roman';">.&nbsp;:)</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">发现网上提供的方法大部分都是通过<span style="line-height: 19px; font-family: 'Times New Roman';">PE</span><span style="line-height: 19px; font-family: 宋体;">工具来替换</span><span style="line-height: 19px; font-family: 'Times New Roman';">simsum.ttc</span><span style="line-height: 19px; font-family: 宋体;">文件的方法</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">个人感觉比较麻烦</span><span style="line-height: 19px; font-family: 'Times New Roman';">.&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">经过不断摸索</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">发现一种只要修改注册表就可以达到要求</span><span style="line-height: 19px; font-family: 'Times New Roman';">.&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">现在分享出来</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">希望对有需要的人有所帮助</span><span style="line-height: 19px; font-family: 'Times New Roman';">.</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 19px; font-size: small;">&nbsp;</span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">1&gt;<span style="line-height: 19px; font-family: 宋体;">　首先安装需要替换的字体</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">在</span><span style="line-height: 19px; font-family: 'Times New Roman';">"</span><span style="line-height: 19px; font-family: 宋体;">提示已安装</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">是否希望替换</span><span style="line-height: 19px; font-family: 'Times New Roman';">"</span><span style="line-height: 19px; font-family: 宋体;">时选择</span><span style="line-height: 19px; font-family: 'Times New Roman';">"</span><span style="line-height: 19px; font-family: 宋体;">是</span><span style="line-height: 19px; font-family: 'Times New Roman';">".&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">这样会在</span><span style="line-height: 19px; font-family: 'Times New Roman';">C:\Windows\Fonts\</span><span style="line-height: 19px; font-family: 宋体;">下生成一个</span><span style="line-height: 19px; font-family: 'Times New Roman';">simsun_0.ttc&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">的字体文件</span><span style="line-height: 19px; font-family: 'Times New Roman';">.</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 19px; font-size: small;"><span style="line-height: 19px; font-family: 宋体;">2&gt;&nbsp;&nbsp;<span style="line-height: 19px; font-family: 宋体;">运行</span><span style="line-height: 19px; font-family: 'Times New Roman';">regedit&nbsp;,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">定位到</span><span style="line-height: 19px; font-family: 'Times New Roman';">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows&nbsp;NT\CurrentVersion\Fonts,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">分别将</span><span style="line-height: 19px; font-family: 'Times New Roman';">"</span></span><span style="line-height: 19px; font-family: 宋体; color: #0000ff; font-weight: bold;">SimSun&nbsp;&amp;&nbsp;NSimSun&nbsp;(TrueType)</span><span style="line-height: 19px; font-family: 宋体;">"&nbsp;<span style="line-height: 19px; font-family: 宋体;">与&nbsp;</span><span style="line-height: 19px; font-family: 'Times New Roman';">"</span></span><span style="line-height: 19px; font-family: 宋体; color: #0000ff; font-weight: bold;">宋体&nbsp;<span style="line-height: 19px; font-family: 'Times New Roman';">&amp;&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">新宋体&nbsp;</span><span style="line-height: 19px; font-family: 'Times New Roman';">(TrueType)</span></span><span style="line-height: 19px; font-family: 宋体;">"<span style="line-height: 19px; font-family: 宋体;">数值从</span><span style="line-height: 19px; font-family: 'Times New Roman';">"simsun.ttc"</span><span style="line-height: 19px; font-family: 宋体;">修改为</span><span style="line-height: 19px; font-family: 'Times New Roman';">"simsun_0.ttc".&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">以下是示例</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">注意红色方框标注的部分</span><span style="line-height: 19px; font-family: 'Times New Roman';">.</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 19px; font-size: small;">&nbsp;</span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-size: small;">SimSun&nbsp;&amp;&nbsp;NSim<span style="line-height: 19px; font-family: 宋体; color: #0000ff; font-weight: bold;">Sun&nbsp;(TrueType)</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-size: small;"><img alt=""  src="http://www.cppblog.com/images/cppblog_com/flyinghare/font_reg1.jpg" height="494" width="754"><br></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-size: small;">宋体&nbsp;<span style="line-height: 19px; font-family: 'Times New Roman';">&amp;&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">新宋体&nbsp;</span><span style="line-height: 19px; font-family: 'Times New Roman';">(TrueType)</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 'Times New Roman';"><span style="line-height: 19px; font-size: small;"><span style="line-height: 19px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-family: 宋体;"><img  src="http://www.cppblog.com/images/cppblog_com/flyinghare/font_reg2.jpg" border="0"></span></span><br></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">3&gt;&nbsp;<span style="line-height: 19px; font-family: 宋体;">注销后重新登录即可</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 19px; font-size: small;">&nbsp;</span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; font-weight: bold;"><span style="line-height: 19px; font-size: small;">这个时候发现可以替换<span style="line-height: 19px; font-family: 'Times New Roman';">simsun.ttc</span><span style="line-height: 19px; font-family: 宋体;">的文件了</span><span style="line-height: 19px; font-family: 'Times New Roman';">.&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">如果觉得修改为</span><span style="line-height: 19px; font-family: 'Times New Roman';">simsun_0.ttc</span><span style="line-height: 19px; font-family: 宋体;">觉得别扭</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">可以将新字体</span><span style="line-height: 19px; font-family: 'Times New Roman';">move</span><span style="line-height: 19px; font-family: 宋体;">为</span><span style="line-height: 19px; font-family: 'Times New Roman';">simsun.ttc&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">文件</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">然后将上述操作重复一遍即可</span><span style="line-height: 19px; font-family: 'Times New Roman';">.&nbsp;</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 19px; font-size: small;">&nbsp;</span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">以管理员身份运行<span style="line-height: 19px; font-family: 'Times New Roman';">cmd</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 19px; font-size: small;">&nbsp;</span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-size: small;">cd&nbsp;\windows\fonts</span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-size: small;">Rem&nbsp;<span style="line-height: 19px; font-family: 宋体;">获取文件所有权</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-size: small;">takeown&nbsp;/f&nbsp;simsun.ttc</span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-size: small;">icacls&nbsp;simsun.ttc&nbsp;/grant&nbsp;everyone:f</span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-size: small;">Rem&nbsp;<span style="line-height: 19px; font-family: 宋体;">替换原来字体</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; font-weight: bold;"><span style="line-height: 19px; font-size: small;">move&nbsp;simsun_0.ttc&nbsp;simsun.ttc</span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 19px; font-size: small;">&nbsp;</span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">再次重新注销登录</span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 19px; font-size: small;">&nbsp;</span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">附<span style="line-height: 19px; font-family: 'Times New Roman';">:</span></span></span><span style="line-height: 21px; font-family: 宋体; font-size: 10.5pt;"><br></span><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">1&gt;&nbsp;<span style="line-height: 19px; font-family: 宋体;">使用的替换字体为碧海潮声使用极限雅黑</span><span style="line-height: 19px; font-family: 'Times New Roman';">3.0</span><span style="line-height: 19px; font-family: 宋体;">修改的等宽雅黑替换宋体版本可在下面链接找到</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><a href="http://behindchoice.blogbus.com/logs/64884249.html" style="text-decoration: none; color: #000000;"><span style="line-height: 21px; font-family: 宋体; color: #0000ff; text-decoration: underline;"><span style="line-height: 19px; font-size: small;">极限雅黑<span style="line-height: 19px; font-family: 'Times New Roman';">3.0&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">标准版之二：替换宋体及替换雅黑</span></span></span></a></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span style="line-height: 21px; font-family: 宋体;"><span style="line-height: 19px; font-size: small;">2&gt;&nbsp;<span style="line-height: 19px; font-family: 宋体;">另附注参考的一篇文章</span><span style="line-height: 19px; font-family: 'Times New Roman';">,&nbsp;</span><span style="line-height: 19px; font-family: 宋体;">非常有用</span><span style="line-height: 19px; font-family: 'Times New Roman';">.</span></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span class="15" style="line-height: 21px; font-family: 'Times New Roman'; color: #0000ff;"><span style="line-height: 19px; font-size: small;"><a href="http://mikedeakins-work.spaces.live.com/blog/cns!B5FAA09B49C4F008!414.entry" style="text-decoration: none; color: #000000;">Use&nbsp;XP&nbsp;New&nbsp;Simsun&nbsp;Font&nbsp;in&nbsp;Windows&nbsp;7</a></span></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span class="15" style="line-height: 21px; font-family: 'Times New Roman'; color: #0000ff;"><br></span></p>
<p class="p0" style="padding: 0px; margin: 0pt 0px;"><span class="15" style="line-height: 21px; font-family: 'Times New Roman'; color: #0000ff;">转自：http://blog.csdn.net/force_eagle/archive/2010/06/13/5668255.aspx</span></p>
</span><img src ="http://www.cppblog.com/flyinghare/aggbug/141298.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2011-03-07 17:58 <a href="http://www.cppblog.com/flyinghare/archive/2011/03/07/141298.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Win7/Vista 巧用 mklink.exe 实现系统和用户文件的分区存放</title><link>http://www.cppblog.com/flyinghare/archive/2011/03/04/141100.html</link><dc:creator>会飞的兔子</dc:creator><author>会飞的兔子</author><pubDate>Fri, 04 Mar 2011 04:05:00 GMT</pubDate><guid>http://www.cppblog.com/flyinghare/archive/2011/03/04/141100.html</guid><wfw:comment>http://www.cppblog.com/flyinghare/comments/141100.html</wfw:comment><comments>http://www.cppblog.com/flyinghare/archive/2011/03/04/141100.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/flyinghare/comments/commentRss/141100.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/flyinghare/services/trackbacks/141100.html</trackback:ping><description><![CDATA[<span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: #000000; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="text-align: left; line-height: 19px; font-family: Arial, Verdana, Helvetica; color: #3f3f3f; font-size: 13px" class="Apple-style-span">&nbsp;&nbsp;&nbsp;最近因为升级WM上的两个小程序，又重新玩起了Windows系统，正好听说Windows 7发布了Beta以及官方中文语言包，就顺便安装了一下，发现Windows 7确实在性能和资源占用上要比Vista有不少的改进，特别是系统启动速度快了不少，稳定性不相当不错，看来MS这两年没少花工夫。好了废话不说转入正题！<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;之前一直在玩ubuntu linux，被它那清晰高效的文件系统和文件结构所深深折服，特别是它的系统文件的结构，可以完全将系统文件和用户自己的文件（包括用户自己的文档、图片等内容和用户自己的大量配置文件）放在完全不同的分区内，这样当系统需要升级或重装时，存放用户文件的分区根本无需有任何变动，当系统重装后，只有还是用这个用户名，那你所有文档和设置都将和重装前完全一样！这就省去了大量的时间和精力，也保证了用户自己重要文件的安全性！<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;而Windows在安装的时候是无法实现这样的分区存放方式的，但从Vista开始，微软提供了一个它至少10年前就应该提供的文件系统的功能：符号链接，命令行工具是mklink.exe(相当于linux下的ln)，这是一个在linux广泛使用的功能，说的简单一点，有点像Windows的.lnk文件，但又完全不一样，一样之处在于访问它和访问目标文件本身没什么区别，不一样之处在于所有第三方程序都需要自己去解析这个.lnk文件，而不像符号链接那样对程序是无缝透明的！<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;那么这个Vista提供了link有什么好处呢，至少第一个好处就是，当我们安装完Vista或Windows 7时，发现系统盘下面没有了名字又长又难以理解的"Documents and Settings"目录，事实上它被当成系统文件隐藏起来了，当你用dia /a的时候还能看到它，但它被link到了另一个新目录：ProgramData，这可以说是Windows的一大改进，它把软件生成的数据和用户自己的数据分离开来了，原先的"Documents and Settings"里的内容事实上被分开来放在&#8221;\ProgramData&#8220;和&#8221;\Users&#8220;这两个地方，而后者更像是linux的home目录，或者OSX的Users目录，它将所有用户自己的配置文件（包括注册表的HKEY_LOCAL_USER的内容）以及&#8220;我的文档&#8221;、&#8220;我的图片&#8221;之类的用户自己的内容都放在了一起，当然，配置文件相当的都放在一个隐藏的叫&#8220;AppData&#8221;的目录下面，它和&#8220;我的图片&#8221;之类都位于&#8220;\Users\我的用户名&#8221;下面，这几乎和linux以及OSX的文件结构完全一致！<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;上面说了这么多的铺垫，不知道大家看明白了没，接下来才是最关键的部分了。以上所有这些目录在系统安装完以后，都还在同一个分区下面，一般情况下都是在C:\下面，也就是说C:\Windows和C:\Users都在一起，这样万一我的系统坏了需要重新就很麻烦了，我得先把&#8220;C:\Users\我的用户名&#8221;目录里的东东都先备份出来（当然你可以说你自己的文件都不是放在C盘里的或者你自己重新定义了&#8220;我的文档&#8221;的位置，这另当别论，至少你没有好好利用这个目录。而之前像&#8220;番茄花园&#8221;之类的XP优化版都是默认将&#8220;我的文档&#8221;重定向到D盘或其它盘上的，这也是为了更方便的让用户管理自己的文档）。<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;而现在我们有了更方便的方法，那就是用mklink.exe这个小工具，以下是一些简要的步骤：<br /><span style="color: #0000ff">&nbsp; &nbsp;1。在&#8220;计算机管理&#8221;里把Administrator用户激活，注销后用Administrator登录；<br />&nbsp; &nbsp;2。把&#8220;C:\Users\我的用户名&#8221;整个目录移到其它盘上，假设移到&#8220;D:\我的用户名&#8221;;<br />&nbsp; &nbsp;3。用mklink.exe创建目录链接：mklink.exe /D C:\Users\我的用户名 D:\我的用户名，提示会显示链接已经建立，并且会有&#8220;&lt;==&gt;&#8221;这样一个符号告诉你这两个目录是等同的；<br /></span></span><span style="color: #ff0000; font-family: Arial, Verdana, Helvetica; font-size: 13px; line-height: 19px; text-align: left; ">&nbsp; &nbsp; &nbsp; &nbsp; (注意，键入命令行时，用 mklink.exe 会报错，只能用 mklink，很诡异)</span><br /><span style="line-height: 19px; font-family: Arial, Verdana, Helvetica; color: #3f3f3f; font-size: 13px; " class="Apple-style-span"><span style="color: #0000ff">&nbsp; &nbsp;4。重新登录你自己的帐号，发现一切都没有变化，变化的只是你的文件将和系统分离，它们将更安全！<br />&nbsp; &nbsp;5。下次重装时，还用同一个用户名，先用Administrator登录后把新系统中的"C:\Users\我的用户名"删除(否则mklink.exe会报无法创建链接)，再用第3步把你位于D盘上的目录重新做下链接即可<br /></span><br />&nbsp; &nbsp;如果你登录系统就是用的帐号本身就是Administrator怎么办？用PE启动！有人已经在PE下测试过mklink.exe是可用的，当然在PE下你得用绝对路径来执行，在系统分区上搜索一下mklink.exe所在的目录即可。<br /><br />&nbsp; &nbsp;前几天我的Windows 7总是无法与PPC同步，就重装了一下，用上面的步骤重新后，发现我所有的用户相关的配置都还存在，包括注册表里的HKEY_LOCAL_USER的内容，收藏夹，IE的cookies，等等内容。。。<br /><br />&nbsp; &nbsp;用mklink.exe实现系统和用户目录分离只是一个简单应用，事实上有了链接这个功能后，我们还能将更多的东西分离出来存放，比如Windows的Temp和Log目录等（可以参考这个帖子：http://www.51nb.com/forum/tid774315），这些在linux都是完全可以独立挂载到其它分区上的，要是Vista/Windows 7在安装的时候就能让用户选择将用户目录重定向到其它分区就完美了！<br /><br />转自：<a href="http://www.alensw.com/read.php?11"><u><font color="#0066cc" size="3">http://www.alensw.com/read.php?11</font></u></a></span></span><img src ="http://www.cppblog.com/flyinghare/aggbug/141100.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/flyinghare/" target="_blank">会飞的兔子</a> 2011-03-04 12:05 <a href="http://www.cppblog.com/flyinghare/archive/2011/03/04/141100.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>