国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > VBScript > 正文

用vbscript實現隱藏任務欄圖標的腳本

2020-07-26 11:56:40
字體:
來源:轉載
供稿:網友
Message = "To work correctly, the script will close" & vbCR
  Message = Message & "and restart the Windows Explorer shell." & vbCR
  Message = Message & "This will not harm your system." & vbCR & vbCR
  Message = Message & "Continue?"
  X = MsgBox(Message, vbYesNo, "Notice")
  If X = 6 Then
  On Error Resume Next
  Dim WSHShell, n, MyBox, p, t, errnum, vers
  Dim itemtype
  Dim enab, disab, jobfunc
  Set WSHShell = WScript.CreateObject("WScript.Shell")
  p = "HKCU/Software/Microsoft/Windows/CurrentVersion/Policies/Explorer/NoTrayItemsDisplay"
  itemtype = "REG_DWORD"
  enab = "ENABLED"
  disab = "DISABLED"
  jobfunc = "Notification Icons are now "
  t = "Confirmation"
  Err.Clear
  n = WSHShell.RegRead (p)
  errnum = Err.Number
  if errnum <> 0 then
   WSHShell.RegWrite p, 0, itemtype
  End If
  If n = 0 Then
   n = 1
  WSHShell.RegWrite p, n, itemtype
  Mybox = MsgBox(jobfunc & disab & vbCR, 4096, t)
  ElseIf n = 1 then
   n = 0
  WSHShell.RegWrite p, n, itemtype
  Mybox = MsgBox(jobfunc & enab & vbCR, 4096, t)
  End If
  Set WshShell = Nothing
  On Error GoTo 0
  For Each Process in GetObject("winmgmts:"). _
   ExecQuery ("select * from Win32_Process where name='explorer.exe'")
   Process.terminate(0)
  Next
  MsgBox "Finished." & vbcr & vbcr , 4096, "Done"
  Else 
  MsgBox "No changes were made to your system." & vbcr & vbcr, 4096, "User Cancelled"
  End If
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 漾濞| 抚远县| 崇礼县| 噶尔县| 灌阳县| 邢台市| 长岭县| 兴海县| 东明县| 宜城市| 岐山县| 阳东县| 锡林郭勒盟| 元江| 葵青区| 威信县| 霍山县| 和政县| 南岸区| 海淀区| 宁陵县| 南溪县| 图木舒克市| 梧州市| 子长县| 抚宁县| 如东县| 绍兴市| 枣阳市| 黑龙江省| 登封市| 通化县| 安平县| 五寨县| 叶城县| 老河口市| 洛川县| 德惠市| 禹州市| 旅游| 崇义县|