set 命令详解Word文档下载推荐.docx

上传人:b****6 文档编号:21802147 上传时间:2023-02-01 格式:DOCX 页数:18 大小:20.18KB
下载 相关 举报
set 命令详解Word文档下载推荐.docx_第1页
第1页 / 共18页
set 命令详解Word文档下载推荐.docx_第2页
第2页 / 共18页
set 命令详解Word文档下载推荐.docx_第3页
第3页 / 共18页
set 命令详解Word文档下载推荐.docx_第4页
第4页 / 共18页
set 命令详解Word文档下载推荐.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

set 命令详解Word文档下载推荐.docx

《set 命令详解Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《set 命令详解Word文档下载推荐.docx(18页珍藏版)》请在冰豆网上搜索。

set 命令详解Word文档下载推荐.docx

如果没有指定长度,则采用默认值,即变量数值的余数。

如果两个数字(偏移量和长度)都是负数,使用的数字则是环境变量数值长度加上指定的偏移量或长度。

~-10%

会提取PATH变量的最后十个字符。

~0,-2%

会提取PATH变量的所有字符,除了最后两个。

如果命令扩展被启用,有几个动态环境变量可以被扩展,但不会出现在SET显示的变量列表中。

每次变量数值被扩展时,这些变量数值都会被动态计算。

如果用户用这些名称中任何一个定义变量,那个定义会替代下面描述的动态定义:

%CD%-扩展到当前目录字符串。

%DATE%-用跟DATE命令同样的格式扩展到当前日期。

%TIME%-用跟TIME命令同样的格式扩展到当前时间。

%RANDOM%-扩展到0和32767之间的任意十进制数字。

%ERRORLEVEL%-扩展到当前ERRORLEVEL数值。

%CMDEXTVERSION%-扩展到当前命令处理器扩展版本号。

%CMDCMDLINE%-扩展到调用命令处理器的原始命令行。

应用例子:

@echooff

titleWindowsXp优化文件!

:

start

cls

color0c

MODEcon:

COLS=50LINES=27

echoWindowsXp优化文件!

echoPoweredByThunderRay!

echo.

echo==============================

echo请选择要进行的操作,然后按回车

echo1.优化系统服务

echo2.进行端口操作

echo3.设置IP为192.168.1.2

echo(局域网上网者慎用此功能)

echo4.其它优化

echo5.设置OEM信息

echo6.清除根目录下的SXS病毒

echo7.清理系统垃圾

echo8.退出

echo.

cho

setchoice=

set/pchoice=请选择:

IFNOT"

%Choice%"

=="

"

SETChoice=%Choice:

~0,1%

if/i"

%choice%"

1"

gotostart2

2"

gotostart3

3"

gotoip

4"

gotoother

5"

gotooem

6"

gotovirus

7"

gotodel

8"

gotoend

echo选择无效,请重新输入

gotocho

start2

echo1.优化XP系统服务

echo2.恢复XP原系统服务

echo3.返回主菜单

echo4.退出

Choice2

setchoice2=

set/pchoice2=请选择:

%Choice2%"

SETChoice2=%Choice2:

%choice2%"

gotooptimize

gotoRestore

gotostart

gotoChoice2

optimize

echo开始进行优化系统服务...

scconfigAlerterstart=DISABLED

scconfigALGstart=DISABLED

scconfigAppMgmtstart=DEMAND

scconfigAudioSrvstart=AUTO

scconfigBITSstart=DEMAND

scconfigBrowserstart=DISABLED

scconfigCiSvcstart=DISABLED

scconfigClipSrvstart=DISABLED

scconfigCOMSysAppstart=DEMAND

scconfigCryptSvcstart=DEMAND

scconfigDcomLaunchstart=AUTO

scconfigDhcpstart=DISABLED

scconfigdmadminstart=DEMAND

scconfigdmserverstart=DISABLED

scconfigDnscachestart=DISABLED

scconfigERSvcstart=DISABLED

scconfigEventlogstart=AUTO

scconfigEventSystemstart=DISABLED

scconfigFastUserSwitchingCompatibilitystart=DISABLED

scconfighelpsvcstart=DISABLED

scconfigHidServstart=DISABLED

scconfigHTTPFilterstart=DEMAND

scconfigImapiServicestart=DISABLED

scconfiglanmanserverstart=DISABLED

scconfiglanmanworkstationstart=AUTO

scconfigLmHostsstart=DISABLED

scconfigMessengerstart=DISABLED

scconfigmnmsrvcstart=DISABLED

scconfigMSDTCstart=DISABLED

scconfigMSIServerstart=DEMAND

scconfigNetDDEstart=DISABLED

scconfigNetDDEdsdmstart=DISABLED

scconfigNetlogonstart=DISABLED

scconfigNetmanstart=DEMAND

scconfigNlastart=DISABLED

scconfigNtLmSspstart=DISABLED

scconfigNtmsSvcstart=DEMAND

scconfigNvsvcstart=DISABLED

scconfigOsestart=DEMAND

scconfigPlugPlaystart=AUTO

scconfigPolicyAgentstart=DISABLED

scconfigProtectedStoragestart=DISABLED

scconfigRasAutostart=DEMAND

scconfigRasManstart=DEMAND

scconfigRDSessMgrstart=DISABLED

scconfigRemoteAccessstart=DISABLED

scconfigRemoteRegistrystart=DISABLED

scconfigRpcLocatorstart=DEMAND

scconfigRpcSsstart=AUTO

scconfigSamSsstart=DISABLED

scconfigSCardSvrstart=DISABLED

scconfigSchedulestart=DISABLED

scconfigseclogonstart=DISABLED

scconfigSENSstart=DISABLED

scconfigSharedAccessstart=DISABLED

scconfigShellHWDetectionstart=DISABLED

scconfigSpoolerstart=DEMAND

scconfigsrservicestart=DISABLED

scconfigSSDPSRVstart=DISABLED

scconfigStisvcstart=DISABLED

scconfigSwprvstart=DISABLED

scconfigSysmonLogstart=DISABLED

scconfigTapiSrvstart=DEMAND

scconfigTermServicestart=DISABLED

scconfigThemesstart=AUTO

scconfigTlntSvrstart=DISABLED

scconfigTrkWksstart=DISABLED

scconfigUMWdfstart=DISABLED

scconfigupnphoststart=DEMAND

scconfigUPSstart=DISABLED

scconfigVSSstart=DISABLED

scconfigW32Timestart=DISABLED

scconfigWebClientstart=DISABLED

scconfigwinmgmtstart=AUTO

scconfigWmdmPmSNstart=DISABLED

scconfigWmistart=DEMAND

scconfigWmiApSrvstart=DISABLED

scconfigwuauservstart=DISABLED

scconfigWZCSVCstart=DISABLED

scconfigwscsvcstart=DISABLED

scconfigxmlprovstart=DEMAND

echo优化XP系统服务结束,按任意键返回!

pause>

nul

gotostart2

Restore

echo开始恢复XP原系统服务...

scconfigALGstart=DEMAND

scconfigBrowserstart=AUTO

scconfigCiSvcstart=DEMAND

scconfigCryptSvcstart=AUTO

scconfigDhcpstart=AUTO

scconfigdmserverstart=AUTO

scconfigDnscachestart=AUTO

scconfigERSvcstart=AUTO

scconfigEventSystemstart=DEMAND

scconfigFastUserSwitchingCompatibilitystart=DEMAND

scconfighelpsvcstart=AUTO

scconfigImapiServicestart=DEMAND

scconfiglanmanserverstart=AUTO

scconfigLmHostsstart=AUTO

scconfigmnmsrvcstart=DEMAND

scconfigMSDTCstart=DEMAND

scconfigNetlogonstart=DEMAND

scconfigNlastart=DEMAND

scconfigNtLmSspstart=DEMAND

scconfigPolicyAgentstart=AUTO

scconfigProtectedStoragestart=AUTO

scconfigRDSessMgrstart=DEMAND

scconfigRemoteRegistrystart=AUTO

scconfigRSVPstart=DEMAND

scconfigSamSsstart=AUTO

scconfigSCardSvrstart=DEMAND

scconfigSchedulestart=AUTO

scconfigseclogonstart=AUTO

scconfigSENSstart=AUTO

scconfigSharedAccessstart=AUTO

scconfigShellHWDetectionstart=AUTO

scconfigSpoolerstart=AUTO

scconfigSSDPSRVstart=DEMAND

scconfigstisvcstart=DEMAND

scconfigSwPrvstart=DEMAND

scconfigSysmonLogstart=DEMAND

scconfigTermServicestart=DEMAND

scconfigTrkWksstart=AUTO

scconfigUMWdfstart=DEMAND

scconfigUPSstart=DEMAND

scconfigVSSstart=DEMAND

scconfigW32Timestart=AUTO

scconfigWebClientstart=AUTO

scconfigWmdmPmSNstart=DEMAND

scconfigWmiApSrvstart=DEMAND

scconfigwscsvcstart=AUTO

scconfigwuauservstart=AUTO

scconfigWZCSVCstart=AUTO

echo恢复XP原系统服务结束,按任意键返回!

start3

echo1.封杀135,445端口

echo2.恢复135,445端口

Choice3

setchoice3=

set/pchoice3=请选择:

%Choice3%"

%choice3%"

gotokillport

gotoopenport

gotoChoice3

killport

echo开始封杀135,445端口...

regaddHKLM\SOFTWARE\Microsoft\Ole/vEnableDCOM/dN/f

regaddHKLM\SOFTWARE\Microsoft\Rpc/v"

DCOMProtocols"

/tREG_MULTI_SZ/dncacn_spx\0ncacn_nb_nb\0ncacn_nb_ipx\0/f

regaddHKLM\SYSTEM\CurrentControlSet\Services\NetBT\Parameters/vSMBDeviceEnabled/tREG_DWORD/d0/f

echo封杀135,445端口结束,按任意键返回!

gotostart3

openport

echo开始恢复135,445端口...

regaddHKLM\SOFTWARE\Microsoft\Ole/vEnableDCOM/dY/f

/tREG_MULTI_SZ/dncacn_spx\0ncacn_nb_nb\0ncacn_nb_ipx\0ncacn_ip_tcp\0/f

scconfigMSDTCstart=AUTO

regaddHKLM\SYSTEM\CurrentControlSet\Services\NetBT\Parameters/vSMBDeviceEnabled/tREG_DWORD/d1/f

echo恢复135,445端口结束,按任意键返回!

ip

echo开始设置IP地址...

netshinterfaceipsetaddressname="

本地连接"

static192.168.1.2255.255.255.0

echo设置I

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 研究生入学考试

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1