Batch Script or registry that enables and shows Quick Launch

xpertoPC
xpertoPC used Ask the Experts™
on
I am looking for a batch script or registry that enables and shows Quick Launch in taskbar, iI prefer to not have aditional programs or files but if there is no other way thats better than nothing.
I could do this with autoit but my scrípt it doesnt work well on every computer.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi xpertoPC
There does not appear to be anything like a simple registry value to toggle the Quick Launch Toolbar on and off, eg.
"ShowQuickLaunch"="1"
Life would have been very simple if there was.

I'm afraid that I don't know of a direct way to do this any faster than just Right-Clicking the Taskbar > Toolbars > QuickLaunch.  However, you may be able to get closer to a method with the following information I found.

Interesting conversation here about the ethics if this is something you want to do as part of a deployment:
http://blogs.msdn.com/oldnewthing/archive/2009/02/02/9388941.aspx

On the Deployment side, there is also There is a registry key and value used to remove ALL Toolbars from the Task Bar in Windows XP:

Policy Template:
http://www.insidetheregistry.com/regdatabase/viewvalue.aspx?valueid=2033

Current User Only:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoToolbarsOnTaskbar"=dword:00000001

System Setting:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoToolbarsOnTaskbar"=dword:00000001

A value of 1 enforces the hidden state, and a 0 ignores the restriction.
Even with the policy enforced, it does still show the Start button, System Tray, and Clock, so perhaps you may find this of use.
This is the most usual cause of questions like this that are frequently encountered:
"The option to 'Show Quick Launch' is greyed out in properties. How to fix it?"

If for your own use, then you could have a look at the following.

The values that are purportedly changed when the QuickLaunch Toolbar is shown or hidden are to be found in the Key and Binary value:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop]
"TaskbarWinXP"=hex:long,comma,separated,hex,pairs,here

I have compared Before and After values and these are NOT changed on my Windows XP Pro SP3 system with IE7.  Of course, there are many changes that are made during a session that take immediate effect, but are only written to the "CURRENT_USER" part of he registry at log off.  Until then many of these settings are stored in the other part of the registry for that user, eg.

[HKEY_USERS\S-1-5-21-527237240-LongNumber-LongNumber-1003\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop]
"TaskbarWinXP"=hex:long,comma,separated,hex,pairs,here

I DON'T see any differences there either, unfortunately.

Bear in mind that changes sometimes require that Windows Explorer is programmatically refreshed to simulate a log off > "saving settings", but that doesn't answer why I see no changes in the (supposedly) relevant registry keys on my system.

Perhaps you could try exporting "Quick_Launch_Shown.reg" and "Quick_Launch_Hidden.reg" files and then comparing them.

There is a good free comparison program here:
PrestoSoft ExamDiff Version 1.8:
Supported OS versions: Windows 95/98/Me/NT/2000/XP/2003/Vista
http://www.prestosoft.com/edp_examdiff.asp

Installer:
http://www.prestosoft.com/download/ed18_setup.exe
Standalone .exe:
http://www.prestosoft.com/download/ed18.zip

The Quick Launch Toolbar is registered here:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{D82BE2B0-5764-11D0-A96E-00C04FD705A2}
with the Default string value "IShellFolderBand" and the "InProcServer32" points to Shell32.dll.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
"{6CF48EF8-44CD-45d2-8832-A16EA016311B}"="IShellFolderBand"

These are the keys and values that are repaired when the Quick Launch Toolbar gets screwed up.

There is a small utility here by Kelly Theriot that is primarily designed to repair taskbar issues, but it does have a few options available in the unregistered version (only $5.00) that may help:
http://www.kellys-korner-xp.com/taskbarplus!.htm
(red asterisks denote options only available in the registered version, but blue hyperlinks denote separately available tweaks usually achieved using *.reg or *.vbs files).

I've looked at what this utility seems to do, and it centres on REPAIRING by re-registering the CLSID rather than "tweaking" anything, but it's a handy utility nonetheless.

Sorry I can't give you a working solution.  maybe other experts know of a method.

Author

Commented:
Thanks BillDL, i already saw and try most of the information you posted but nothing works the only part that i dont understand or probably there is something that it could be done is with this code, anyone knows how to manipulate this to make it work?

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{D82BE2B0-5764-11D0-A96E-00C04FD705A2}
with the Default string value "IShellFolderBand" and the "InProcServer32" points to Shell32.dll.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
"{6CF48EF8-44CD-45d2-8832-A16EA016311B}"="IShellFolderBand"

The if there is no other way anyone knows very well autoit for a full working code?

Author

Commented:
Where are the Masters / Gurus tonight? anyone knows something about this subjet?
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

Author

Commented:
help.......................................................
Hi xpertoPC

I discovered that "TrayProperties" is a scriptable Shell Object:
http://msdn.microsoft.com/en-us/library/bb774105(VS.85).aspx
but the only way I know to tick boxes is by simulating key presses with "SendKeys":
http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx

Bearing in mind that I am not an experienced programmer and only know snippets of how to do things, I pieced together a VB Script that:

1. Opens Taskbar Properties
2. Simulates Alt + Q to tick or untick the underlined Q in the dialog's "Show &QuickLaunch Toolbar" (in shell32.dll)
3. Simulates the "Apply" button being pressed - Alt + A (&Apply)
4. Simulates the OK button being clicked using the "Enter" keystroke to close the dialog.

I used the "Sleep" function, like DOS batch programmers use a timed PING command or START /wait COMMAND, to halt processing.  The 200 milliseconds is a nominal value, and I've seen 500 milliseconds used also.

My worry was that the keystrokes may be sent to any other open windows, but they seem to only be sent to the Taskbar Properties dialog while it is opened.

SendKeys is a clunky method and can cause unpredictable results in instances where used in background processes or something like a scheduled task that buts in, but it works for this purpose.

With a few additions this could be used in a VB Editor to compile an executable (I don't know enough about that aspect), but in the end this would probably be much the same as AutoIT3 would be doing anyway.

After finding out about the TrayProperties shell object being scriptable, I thought I would check to see if anyone had a method of forcing the Quicklaunch Toolbar to show as default in "Unattended" Windows Installations, so I searched google for "unattended quicklaunch trayproperties" and got this page as my first hit:
http://www.myitforum.com/forums/tm.asp?m=90841

You will notice that others have used SendKeys also.

Perhaps if you were to add a couple of other programming-specific Zones to your question and click the "Request Attention" link, you may get more qualified responses.  At present your question is only being shown in MS-DOS.

Regards
Bill
Toggle-Quick-Launch-vbs.txt
By the way, it's a real nuisance when the QuickLaunch Toolbar is toggled back on.  The icons have lost their sort order and the toolbar width is back at the default with the chevron >> button showing to allow access to the rest of the icons outwith the toolbar's width.  This isn't just the script, it happens if you do the same using the Right-Click > Toolbars > QuickLaunch manual method.

Retaining the sort order would mean having to isolate what values are changed in the registry for the current user, reset them, and probably refresh Windows Explorer or force a logout and logon to apply them.  Those types of values are usually binary and changing one hex value can affect several other settings that you may not want to change.

Author

Commented:
Thanks BillDL, sorry that i took a long time to answer, your script work great, do you know if there is a way that the script finds out if quick launch is enabled and only enables it. Instead of enabling and disableing it every time you run it?

Author

Commented:
Thanks BillDL this worked well and probably is the only possible solution on a working windows.

Thank you for taking your time for helping me.
Thank you xpertoPC

I'm afraid that I am not advanced enough with VB Scripts to know how to check the status of the Quick launch Toolbar.  I tried to see if there were any singular fixed values in the registry that I could use to check and then either call the VB Script or not, but I the only changing value is a binary one in which the paired hex values seem to keep moving around, making it impossible for me to pin down what ones affect the toolbar.

Sorry.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial