Set "never combine" in Windows 7 using the registry?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: City Beneath the Waves Looping
--
Chapters
00:00 Set &Quot;Never Combine&Quot; In Windows 7 Using The Registry?
00:14 Accepted Answer Score 10
00:49 Answer 2 Score 3
01:09 Answer 3 Score 0
02:38 Thank you
--
Full question
https://superuser.com/questions/135015/s...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows7 #taskbar #windowsregistry #regedit #combine
#avk47
ACCEPTED ANSWER
Score 10
You're looking for the "never group taskbar buttons" feature.
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarGlomLevel = 00000002
See KnifeySpoony's comment on an article about Windows 7 taskbar buttons at HowToGeek for more information.
TaskbarGlomLevel – Changes the grouping so that the windows do not turn into squares and overlap each other. They will still group if you have too many windows open. If you want to never group windows, change this value to 00000002.
ANSWER 2
Score 3
Standing on the shoulders of Rob:
Via powershell (src):
#http://superuser.com/questions/135015
$taskbarButtonsRegKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
if (((Get-ItemProperty -path $taskbarButtonsRegKey ).TaskbarGlomLevel ) -Ne 2)
{
Set-ItemProperty -Path $taskbarButtonsRegKey -Name "TaskbarGlomLevel" -Value 00000002
}
Via chocolatey (package):
choco install taskbar-never-combine
ANSWER 3
Score 0
Rather old question, but here is my 2 cents in VBScript to programmatically change the setting in registry then refresh the Taskbar to take the change into account without rebooting or killing explorer.exe.
Solution 1 : Requires having Excel installed to make the call to the Win32 API via VBA in order to refresh the Taskbar. A bit heavy solution, since it requires loading the entire application in background.
Dim WshShell, nKey
Set WshShell = WScript.CreateObject("WScript.Shell")
nKey= WshShell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarGlomLevel")
If nKey = 0 Then
WshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarGlomLevel", 2, "REG_DWORD"
ElseIf nKey = 2 Then
WshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarGlomLevel", 0, "REG_DWORD"
End If
'Private Const WM_WININICHANGE = &H1A&
'Private Const WM_SETTINGCHANGE = WM_WININICHANGE
'~~> DOES NOT WORK
'litterals seem required even if documentation should allow defining a constant with another constant
'https://www.vbsedit.com/html/61ad308e-6c17-4cd5-a9a6-8a47dc628ba1.asp
'https://stackoverflow.com/questions/15513606/understanding-const-expression-in-vbscript
'Script56.chm
Private Const WM_SETTINGCHANGE = &H1A&
Private Const HWND_BROADCAST = &HFFFF&
'http://www.cpearson.com/excel/call.htm
Dim excel
Set excel = CreateObject("Excel.Application")
Dim strMacro
strMacro = "CALL(""user32"",""SendMessageA"",""JJJJC""," & HWND_BROADCAST & "," & WM_SETTINGCHANGE & "," & 0 & ",""TraySettings"")"
excel.ExecuteExcel4Macro(strMacro)
Solution 2 : More complicated, but usually quicker, using PowerShell to run an inline script making the call.
Dim WshShell, nKey
Set WshShell = WScript.CreateObject("WScript.Shell")
nKey= WshShell.RegRead("HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarGlomLevel")
If nKey = 0 Then
WshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarGlomLevel", 2, "REG_DWORD"
ElseIf nKey = 2 Then
WshShell.RegWrite "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarGlomLevel", 0, "REG_DWORD"
End If
command = "powershell.exe -nologo -command ""add-type -name user32 -namespace '' -memberDefinition '[DllImport(\""user32.dll\"", CharSet=CharSet.Auto)] public static extern IntPtr SendMessageTimeout(IntPtr hWnd, uint Msg, UIntPtr wParam, string lParam, uint fuFlags, uint uTimeout, out UIntPtr lpdwResult);'; $HWND_BROADCAST = [intptr]0xffff; $WM_SETTINGCHANGE = 0x1a; $result = [uintptr]::zero; [user32]::SendMessageTimeout($HWND_BROADCAST, $WM_SETTINGCHANGE, [uintptr]::Zero, \""TraySettings\"", 2, 5000, [ref]$result); """
Set objShell = CreateObject("Wscript.shell")
objShell.run command,0