我一直在搜索并尝试3天,仍然无法隐藏Windows任务栏。我试过了
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"QuickLaunchEnabled"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell"=REG_SZ:00000001
没有用。这样做的正确方法是什么?
答案 0 :(得分:1)
我们在与我签约的这家公司中有一个旧版应用程序,因此我们开发了.vbs登录脚本来执行此操作。将其添加到登录脚本中,该脚本将隐藏该脚本,并且在用户重新登录时不会将其放回。
Wscript.Sleep 5000
' ***************************************************************************************
' AutoHideTaskbar.vbs
' This script enables or disables the "Auto-Hide the taskbar" option by sending Alt+u key
' when the tray properties are been opened
' Modify the variable cSendKeyValue with any of the values below
' %l - Alt+l - Lock the taskbar
' %u - Alt+u - Auto-hide the taskbar
' %t - Alt+t - Keep the taskbar on top
' %g - Alt+g - Group similar taskbar buttons
' %q - Alt+q - Show Quick launch
' %k - Alt+k - Show the clock
' %h - Alt+h - Hide inactive icons
' ***************************************************************************************
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set Wshshell = WScript.CreateObject("WScript.shell")
set fso = createobject("Scripting.FilesystemObject")
Set WshSysEnv = WshShell.Environment("system")
Set WshSysEnv2 = WshShell.Environment("PROCESS")
' CHECK TO SEE IF USER AUTO-HIDE ALREADY RUN AND SKIP IF SO TO NOT UNDO WHAT WAS SET
If fso.FileExists("C:" & WshSysEnv2("HOMEPATH") & "\autohide.txt") then
WScript.Quit
else
cSendKeyValue = "%u" ' Alt+u = Auto-hide the taskbar
Set WshShell = Wscript.CreateObject("Wscript.shell")
Set oShell = CreateObject("Shell.Application")
oShell.TrayProperties
Wscript.Sleep 500
WshShell.SendKeys cSendKeyValue
Wscript.Sleep 250
WshShell.SendKeys "{ENTER}" ' Enter to Close Properties
Set oShell = Nothing
strOutputFile = "C:" & WshSysEnv2("HOMEPATH") & "\autohide.txt"
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.CreateTextFile(strOutputFile, TRUE)
objOutputFile.WriteLine("True")
End If
objOutputFile.Close
Set objFileSystem = Nothing
WScript.Quit
答案 1 :(得分:0)
这个问题有点陈旧,但我确实想发布一个解决方案(因为它出现在Google中)。该用户制作了一个简洁的脚本,在Windows可执行文件中执行切换功能:http://www.mim-sraga.hr/zvuk/toggleTaskbarAutohide.htm
非常方便,完全符合我的需要。听起来这对你来说也是一个很好的解决方案。