Reputation: 580
I am trying to show and configure Quick Launch toolbar on Win 10 taskbar from command line / batch file / registry patch / PowerShell script / VBS / C# / C++. After searching the Internet, I was able to accomplish two steps out of three:
"%USERPROFILE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch"
folder with the .lnk files that I want to appear in the Quick Launch toolbar - this is easy.HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop
key, TaskbarWinXP
value and restarting Explorer so that the changes take effect. The format of the blob is not documented, but this is of no concern to me - I simply need to ensure that the taskbar contains only Quick Launch toolbar and no other toolbars, so I can afford to just prepare the taskbar on a test machine, export the blob and then import it into the registry on target machine. And the Quick Launch toolbar does show up on the taskbar and shows all the links corresponding to .lnk files. Not the most elegant way, but it works.Update 0: actually it does not really work - the account name is hard-coded in the blob as part of the path to the Quick Launch folder, so when moving from a test machine to the target machine the blob will not work if the username is different of the target machine. I guess I will need to reverse-engineer the blob format anyway in order to generate a correct one.
I can't find any recipes for that.
These settings are not stored in the HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop
key, TaskbarWinXP
value blob, I did binary comparisons of different versions of this blob before and after manual change, they are identical. They must be stored somewhere else.
Update 1: I was wrong, these values are stored in the blob, but they are not committed to the registry right away by Windows Explorer. It seems like Explorer holds these values in RAM and only commits them to registry when it terminates normally, e.g. during logout or reboot. If you terminate Explorer by killtask, it won't commit these changes.
I also tried spying on the system using SysInternals procmon64 while I perform these three actions manually with a mouse. Process monitor does not detect any meaningful and relevant activities with either registry or files during such manual manipulations, only a bunch of background noise. But Explorer has to store these changing settings somewhere... What am I missing?
Update 2: As I have mentioned in the update 1, the reason I don't see any registry traffic when I am manually creating the toolbar is because Explorer postpones registry commit until normal shutdown.
So, after all updates, I have quite opposite situation: I no longer have issues with item 3, but I do need to know the format of the blob stored in registry HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop
key, TaskbarWinXP
value. Or a proper API to create such blob. Anyone has any pointers?
Upvotes: 3
Views: 3247
Reputation: 580
OK, I have solved my problems. And I did not have to reverse-engineer the blob format for that (although I have started that fun process and managed to learn a few things about its internal structure). Anyway, my solution was this:
C:\Users\<insert_your_fixed_username_here>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
, which would commit a fixed username into the blob as part of the path, you need to specify "%USERPROFILE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch"
in Select Folder dialog as one line (the starting location for the Select Folder dialog is not important in this case). When you do that, Explorer will create a blob where the current user name is not hard-coded, and instead the environment variable %USERPROFILE%
name is placed in the blob. This makes the blob re-usable for any user I want to deploy the Quick Launch toolbar to.HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop
key from the registry into the .reg file for future use.The rest is easy, write a batch file that does the following:
"C:\Users\<insert_your_fixed_username_here>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch"
folder and places necessary .lnk files there and deletes unnecessary ones.reg import
command).taskkill /f /IM explorer.exe & start explorer.exe
Now any desired user on your target machine will have exactly one Quick Launch toolbar and no other nonsense toolbars! And the toolbar will have the look and feel you want.
Tested on both real and virtual machines, works equally well.
Caveat: did not test on non-English version of Win10, and I expect localization issues because some folder names are hard-coded now.
Upvotes: 3