手机
当前位置:查字典教程网 >脚本专栏 >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实现右键菜单中添加CMD HERE

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

用vbs实现更改计算机的说明的代码

用vbs实现zip功能的脚本

用vbs实现删除名称中有撇号的文件夹

vbs复制文件的脚本

用vbs实现的exe2swf工具脚本代码

用vbscript实现在消息框中显示一个超链接

利用vbscript的for命令实现定时关机

vbs版的解密base64加密的脚本

精品推荐
分类导航