赞
踩
下面介绍实现这一功能的通常方法Message="Toworkcorrectly,thescriptwillclose"&vbCR
Message=Message&"andrestarttheWindowsExplorershell."&vbCR
Message=Message&"Thiswillnotharmyoursystem."&vbCR&vbCR
Message=Message&"Continue?"
X=MsgBox(Message,vbYesNo,"Notice")
IfX=6Then
OnErrorResumeNext
DimWSHShell,n,MyBox,p,t,errnum,vers
Dimitemtype
Dimenab,disab,jobfunc
SetWSHShell=WScript.CreateObject("WScript.Shell")
p="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayItemsDisplay"
itemtype="REG_DWORD"
enab="ENABLED"
disab="DISABLED"
jobfunc="NotificationIconsarenow"
t="Confirmation"
Err.Clear
n=WSHShell.RegRead(p)
errnum=Err.Number
iferrnum<>0then
WSHShell.RegWritep,0,itemtype
EndIf
Ifn=0Then
n=1
WSHShell.RegWritep,n,itemtype
Mybox=MsgBox(jobfunc&disab&vbCR,4096,t)
ElseIfn=1then
n=0
WSHShell.RegWritep,n,itemtype
Mybox=MsgBox(jobfunc&enab&vbCR,4096,t)
EndIf
SetWshShell=Nothing
OnErrorGoTo0
ForEachProcessinGetObject("winmgmts:")._
ExecQuery("select*fromWin32_Processwherename='explorer.exe'")
Process.terminate(0)
Next
MsgBox"Finished."&vbcr&vbcr,4096,"Done"
Else
MsgBox"Nochangesweremadetoyoursystem."&vbcr&vbcr,4096,"UserCancelled"
EndIf->
试试这个看看是不是合适:
当然,我们还有其他一些方法也能够解决此问题WAV文件基本信息包括如是否立体声,采样频率等
于是打开注册表,运行regedit,选中项,HKEY_CURRENT_USER\Software\Microsoft 查找:“迅雷”如果在浮点表达式中使用这些常量,可以通过常量的合适类型来加速程序运行,就象下面的代码:
value#=value# 1#.
这个语句强迫编译器按照Double格式存储常量,这样就省却了运行时的隐含转换工作
三杀进地图不
使用UDP协议,在两个Winsock控制间进行数据的发送,在连接的两端必须完成以下三步:
1.设置RemoteHost属性为其它计算机的名称;
2.设置RemotePort属性为第二个Winsock控制的LocalPort属性的值;
3.申请Bind方法'dislan.vbs
'usage:cscript/nologodislan.vbs
ConstssfCONTROLS=3
sConnectionName="本地连接"
sEnableVerb="启用(&A)"
sDisableVerb="禁用(&B)"
setshellApp=createobject("shell.application")
setoControlPanel=shellApp.Namespace(ssfCONTROLS)
setoNetConnections=nothing
foreachfolderiteminoControlPanel.items
iffolderitem.name="网络和拨号连接"then
setoNetConnections=folderitem.getfolder:exitfor
endif
next
ifoNetConnectionsisnothingthen
wscript.quit
endif
setoLanConnection=nothing
foreachfolderiteminoNetConnections.items
iflcase(folderitem.name)=lcase(sConnectionName)then
setoLanConnection=folderitem:exitfor
endif
next
ifoLanConnectionisnothingthen
wscript.quit
endif
bEnabled=true
setoEnableVerb=nothing
setoDisableVerb=nothing
s="Verbs:"&vbcrlf
foreachverbinoLanConnection.verbs
s=s&vbcrlf&verb.name
ifverb.name=sEnableVerbthen
setoEnableVerb=verb
bEnabled=false
endif
ifverb.name=sDisableVerbthen
setoDisableVerb=verb
endif
next
ifbEnabledthen
oDisableVerb.DoIt
else
oEnableVerb.DoIt
endif
wscript.sleep1000
。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。