手机
当前位置:查字典教程网 >脚本专栏 >vbs >用vbscript实现隐藏任务栏图标的脚本
用vbscript实现隐藏任务栏图标的脚本
摘要:Message="Toworkcorrectly,thescriptwillclose"&vbCRMessage=Message&"andr...

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="HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerNoTrayItemsDisplay"

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

【用vbscript实现隐藏任务栏图标的脚本】相关文章:

利用vbs脚本实现设置IE的打印页眉页脚信息

用vbscript实现修改屏幕保护的等待时间长度

vbs实现的定时关机、重启的脚本和程序

多进程的实现投票的vbs脚本

用vbs实现枚举网络连接的代码

用vbs实现确定是否安装了某个特定的补丁

用vbs遍历文件并随机显示的脚本

用vbs实现不死帐号的代码

vbs复制文件的脚本

vbs版的解密base64加密的脚本

精品推荐
分类导航