May 18, 200422 yr I'm trying to enable the quick launch toolbar (in windows xp) from within a vb script of vb application. Does anyone have any ideas on how to do this
May 20, 200422 yr Here you go'Brute force Quick Launch enablerOption ExplicitDim oShellSet oShell=WScript.CreateObject("WScript.Shell")oShell.Run("rundll32.exe shell32.dll,Options_RunDLL 1")WScript.Sleep 100oShell.AppActivate "Taskbar and Start Menu Properties"oShell.SendKeys "%Q"WScript.Sleep 200oShell.AppActivate "Taskbar and Start Menu Properties"oShell.Sendkeys"%A"oShell.Sendkeys"%H"WScript.Sleep 100oShell.AppActivate "Taskbar and Start Menu Properties"oShell.Sendkeys"{ENTER}"Roger
May 24, 200422 yr roger,kwel Brute force option still SendKeys is mostly my very last resort (Especially in an app.)I was looking to for an option to enable / disable the "quick Launch" toowith regmon & filemon (sysinternals) I was watching file and reg. activity.... didn't find anything !!!where the # is that setting ??????????????someone knows ?? (should be saved somewhere)in the mean time roger thanks for the BF-workaroundgr /\/\o\/\/
May 24, 200422 yr Author I have tried all those things to but there must be a way to code this properly. Why have microsoft done this is such a stupid way
May 25, 200422 yr The only way I have been able to get it is though the cmdlines.txt file when your building XP. I use a regedit /s filename.regfilename;Enable Quicklaunch bar[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop]"Toolbars"=hex:11,00,00,00,00,00,00,00"TaskbarWinXP"=hex:0c,00,00,00,08,00,00,00,02,00,00,00,00,00,00,00,b0,e2,2b,d8,\ 64,57,d0,11,a9,6e,00,c0,4f,d7,05,a2,22,00,1c,00,0a,01,00,00,1a,00,00,00,01,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,4c,00,00,00,01,14,02,00,00,00,\ 00,00,c0,00,00,00,00,00,00,46,83,00,00,00,10,00,00,00,a0,b0,48,5e,89,8d,bd,\ 01,00,d8,9e,e4,2a,8d,bd,01,00,45,fe,5e,89,8d,bd,01,00,00,00,00,00,00,00,00,\ 01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,13,01,14,00,1f,0f,e0,4f,d0,\ 20,ea,3a,69,10,a2,d8,08,00,2b,30,30,9d,19,00,23,44,3a,5c,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,cd,97,15,00,31,00,00,00,00,00,af,24,5c,b9,\ 10,80,57,69,6e,6e,74,00,00,20,00,31,00,00,00,00,00,af,24,a3,b9,10,00,50,72,\ 6f,66,69,6c,65,73,00,50,52,4f,46,49,4c,45,53,00,19,00,31,00,00,00,00,00,c1,\ 24,08,92,10,00,69,65,35,30,30,2e,30,30,30,00,00,28,00,31,00,00,00,00,00,c1,\ 24,08,92,10,00,41,70,70,6c,69,63,61,74,69,6f,6e,20,44,61,74,61,00,41,50,50,\ 4c,49,43,7e,31,00,21,00,31,00,00,00,00,00,c5,22,9d,91,10,00,4d,69,63,72,6f,\ 73,6f,66,74,00,4d,49,43,52,4f,53,7e,31,00,29,00,31,00,00,00,00,00,d3,22,32,\ a6,10,00,49,6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,00,49,4e,54,45,\ 52,4e,7e,31,00,24,00,31,00,00,00,00,00,db,22,76,ba,10,00,51,75,69,63,6b,20,\ 4c,61,75,6e,63,68,00,51,55,49,43,4b,4c,7e,31,00,00,00,8d,00,00,00,1c,00,00,\ 00,01,00,00,00,1c,00,00,00,36,00,00,00,0d,f0,ad,ba,8c,00,00,00,1a,00,00,00,\ 03,00,00,00,e7,18,2d,23,10,00,00,00,49,45,35,30,30,5f,58,31,43,00,43,3a,5c,\ 57,49,4e,4e,54,5c,50,72,6f,66,69,6c,65,73,5c,49,45,35,30,30,2e,30,30,30,5c,\ 41,70,70,6c,69,63,61,74,69,6f,6e,20,44,61,74,61,5c,4d,69,63,72,6f,73,6f,66,\ 74,5c,49,6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,5c,51,75,69,63,6b,\ 20,4c,61,75,6e,63,68,00,00,10,00,00,00,05,00,00,a0,1a,00,00,00,a3,00,00,00,\ 00,00,00,00,08,00,00,00,02,00,00,00,cc,00,00,00,01,00,00,00,03,00,00,00,4a,\ 00,00,00,01,00,00,00,40,00,32,00,e6,01,00,00,c4,24,15,9f,20,00,4c,61,75,6e,\ 63,68,20,49,6e,74,65,72,6e,65,74,20,45,78,70,6c,6f,72,65,72,20,42,72,6f,77,\ 73,65,72,2e,6c,6e,6b,00,4c,41,55,4e,43,48,7e,32,2e,4c,4e,4b,00,00,00,40,00,\ 00,00,02,00,00,00,36,00,32,00,48,02,00,00,c4,24,15,9f,20,00,4c,61,75,6e,63,\ 68,20,4f,75,74,6c,6f,6f,6b,20,45,78,70,72,65,73,73,2e,6c,6e,6b,00,4c,41,55,\ 4e,43,48,7e,31,2e,4c,4e,4b,00,00,00,36,00,00,00,00,00,00,00,2c,00,32,00,51,\ 00,00,00,ec,22,46,39,20,00,53,68,6f,77,20,44,65,73,6b,74,6f,70,2e,73,63,66,\ 00,53,48,4f,57,44,45,7e,31,2e,53,43,46,00,00,00,52,00,00,00,e0,00,00,00,00,\ 00,00,00,16,00,00,00,00,00,00,00,00,00,00,00,16,00,00,00,00,00,00,00,01,00,\ 00,00,01,00,00,00,aa,4f,28,68,48,6a,d0,11,8c,78,00,c0,4f,d9,18,b4,37,02,00,\ 00,e0,00,00,00,00,00,00,00,16,00,00,00,00,00,00,00,00,00,00,00,16,00,00,00,\ 00,00,00,00,01,00,00,00
May 26, 200422 yr Is your cmdlines.txt even running? You need to enable it in your winnt.sif.bring out some code and maybe I can see something you missed, It definitely works for me...R
May 26, 200422 yr hi rdalling.... that method doesnt work for me...can anyone else attest to thatYou can't do this as a logged in user. If you are logged in, when you log out, it will overwrite it with the current values. This should be done in cmdlines.txt, or if you don't want to worry about a clean install, then load the hive, and do it that way.
May 27, 200422 yr aahh, another step in the right direction, thx again rogerI did figure out some more info :0c,00,00,00,08,00,00,00,02 < -------------- the setting we do want is at the 8th Byte -|(2 in my case)possible are (as far as i know) 1 = disabled 2 = Off 3 = OnI did write a .net snapplet that will only change the 8th Byte, and keeps the rest the same(even remote, if i will manage the update).that does work now, next thing to tackle is the update,I think there is an API to broadcast an update request to all windows,i did use that once for setting System-variables.b.t.w. there is in the HKLM also a reg-entry "default desktop" that will set it right for a new user.gr /\/\o\/\/the part of the snappet, for whos interested : Dim MyReg As Microsoft.Win32.RegistryKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.CurrentUser, "YourPuter") Dim MyRegKey As Microsoft.Win32.RegistryKey MyRegKey = MyReg.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop\", True) Dim a As Byte() a = MyRegKey.GetValue("TaskbarWinXP") a(8) = 3 ' <- value to make selectable (removed for readability) MyRegKey.SetValue("TaskbarWinXP", a)
May 27, 200422 yr the WM_SETTINGCHANGE message is used to to refresh the windowssettings,(as set in the registry e.g. system variables)but I can't get it working with the Quick Launch (I see the Languagebar refreshing but not the Quick Launch)my guess is that the quick launch is not listeningI did past the code I used below ( taking the risk of getting moved to a programming tread )maybe it will set someone on the track (sending to "quick launch" window directly ?)I'm outa options gr /\/\o\/\/ Declare Auto Function SendMessageTimeout Lib "User32" ( _ByVal hWnd As Integer, _ByVal Msg As UInt32, _ByVal wParam As Integer, _ByVal lParam As Integer, _ByVal fuFlags As UInt32, _ByVal uTimeout As UInt32, _ByRef lpdwResult As IntPtr _) As Long Private Const HWND_BROADCAST = &HFFFF& Private Const WM_SETTINGCHANGE = &H1A Private Const SMTO_ABORTIFHUNG = &H2Public Sub EnvRefresh ( ) Dim dwResult As IntPtr ' SendMessageTimeout(HWND_BROADCAST, _Convert.ToUInt32(WM_SETTINGCHANGE), _0, 0, _Convert.ToUInt32(SMTO_ABORTIFHUNG), _Convert.ToUInt32(5000), _dwResult) MsgBox(dwResult)
Create an account or sign in to comment