mercadantelaura Posted September 3, 2013 Posted September 3, 2013 I have done a script that modify some binary data into Windows Registry. Some of them immediately refresh and Auto-Update Shell Explorer, others i must close Windows Shell Explorer and open New istance of it to take effect because also pressing "F5" to force refresh, it don't take effect in order to reload explorer structure from registry that i have modified. I think that in these case need a deep refresh of windows Shell Explorer after registry change and this refresh is performed invoking Win32 API code :-/ ======================================================== ---- Simple Example --- If I manually change this value in order to Disable Status Bar of Windows Explorer, i must open new session of it to apply change [HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain] "StatusBarOther"=dword:00000000 ...but... if i don't use KeyReg and i go with mouse in Menu-Bar and i click on "Disable Status Bar" or i use ShortKey (in my language: "ALT-V" --> "B" --> "ENTER" ) immediately windows take effect without closing explorer. ======================================================== I have readed on forum similar problem:'?do=embed' frameborder='0' data-embedContent>> but under my Win7 x64 Sp1 don't run . There is some possibility to use AutoIT script using KeyReg to obtain the same design an extra function that i call when i want Refresh all Structure of Explorer after all my registry change with Seven 64 Bit Sp1? Thanks
mercadantelaura Posted September 3, 2013 Author Posted September 3, 2013 There is no member that have some suggestions to give me to do this ? Please, Help me if you can or someone have some idea to solve my problem. Thank you very much.
Moderators Melba23 Posted September 3, 2013 Moderators Posted September 3, 2013 mercadantelaura,Please do not bump your own threads within 24 hours. Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
TheSaint Posted September 3, 2013 Posted September 3, 2013 And if you look, you will see quite a few have viewed your topic, so it is getting plenty of attention. So obviously not a common question. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
mercadantelaura Posted September 3, 2013 Author Posted September 3, 2013 TheSaint & Melba223 you have perfectly reason Sorry very much for my impatience. :-( I hope that in forum there is someone that know something about and will help me.
AdamUL Posted September 3, 2013 Posted September 3, 2013 Have a look at this >function. I have updated it below. Func _Update_Explorer() Local $bOld = Opt("WinSearchChildren", True) Local $aWinListSHELLDLL_DefView = WinList("[CLASS:SHELLDLL_DefView]") For $i = 0 To $aWinListSHELLDLL_DefView[0][0] DllCall("user32.dll", "long", "SendMessage", "hwnd", $aWinListSHELLDLL_DefView[$i][1], "int", 0x111, "int", 28931, "int", 0) Next Opt("WinSearchChildren", $bOld) EndFunc ;==>_Update_Explorer Adam
mercadantelaura Posted September 4, 2013 Author Posted September 4, 2013 (edited) Thank you ADAM for reply, but nothing to do.Your script don't take effect.Running my example "STATUSBAR" is always visible after change.I see that your script refreshes desktop icons but don't refresh Windows Shell Explorer structure.Infact if I want disable "STATUSBAR" of Shell Explorer i must Run script and i need toclose explorer session and open it again to take effect.Instead, using option "StatusBar On-OFF" in the MenuBar of Windows Explorer(NOT Internet Explorer but the shell explorer of Windows) the change are immediately updated without close session.How internal command invoke Microsoft to do this ??My O.S. is: Win7 Sp1 64 Bit -- Theme Windows Classic (Not Aero) -- Logged as administrator#include <Process.au3> If _ProcessGetName(WinGetProcess("[active]"))<>"Explorer.exe" then msgbox(0, "", "Explorer Not Active", 1) Exit Endif $Key=RegRead("HKCU\Software\Microsoft\Internet Explorer\Main", "StatusBarOther") If $Key = 1 Then RegWrite("HKCU\Software\Microsoft\Internet Explorer\Main", "StatusBarOther", "REG_DWORD", 0) Else RegWrite("HKCU\Software\Microsoft\Internet Explorer\Main", "StatusBarOther", "REG_DWORD", 1) EndIf ; ##=======> I have inserted here your script to REFRESH <=============## Local $bOld = Opt("WinSearchChildren", True) Local $aWinListSHELLDLL_DefView = WinList("[CLASS:SHELLDLL_DefView]") For $i = 0 To $aWinListSHELLDLL_DefView[0][0] DllCall("user32.dll", "long", "SendMessage", "hwnd", $aWinListSHELLDLL_DefView[$i][1], "int", 0x111, "int", 28931, "int", 0) Next Opt("WinSearchChildren", $bOld) Edited September 4, 2013 by Melba23 Added code tags
Moderators Melba23 Posted September 4, 2013 Moderators Posted September 4, 2013 mercadantelaura,When you post code please use Code tags - see here how to do it. Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
mercadantelaura Posted September 4, 2013 Author Posted September 4, 2013 OK, i will do it in future. Thanks for edit and correction of my previous post
mercadantelaura Posted September 4, 2013 Author Posted September 4, 2013 AdamUL: I have proved to run your script also under Win7-32 Bit, but also under this operating system it don't take effect in order to refresh explorer structure after key registry change. Have you possibility to prove my script under your computer ?
mercadantelaura Posted September 5, 2013 Author Posted September 5, 2013 Melba23 i have readed info on your link in order to post code on forum. But what kind of program is used in the link ?? SciTE of AutoIT have a different GUI from picture in the link.also do same thing. Thanks
AdamUL Posted September 5, 2013 Posted September 5, 2013 I tired the script, and it did not work as expected. I'm not sure what message to send to the Window to make it show the Status bar. Here is a work around using ControlSend, that I was able to get to work. #include <Process.au3> If _ProcessGetName(WinGetProcess("[active]")) <> "Explorer.exe" Then MsgBox(0, "", "Explorer Not Active", 1) Exit EndIf ControlSend("[CLASS:CabinetWClass]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "!v") ControlSend("[CLASS:CabinetWClass]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "b") This also sets the registry key. So you can read the key to see if the Status bar is show or not showing. The same commands will hide it as well. Adam
mercadantelaura Posted September 6, 2013 Author Posted September 6, 2013 Thanks AdamaUL. Now i'm using ContrtrolSend too, but there are lots other key registry change that i modify that unfortunately not have shortcut to use. I hope that in future some member will discover solution to obtain Deep Structure refresh of explorer shell.
mercadantelaura Posted September 6, 2013 Author Posted September 6, 2013 For example using key registry, i change dimension of left panel (where is showed tree folder) and right panel (where is showed list of files/directory) without changing dimension of window. ...Or disable left NavPane (now i'm using for this point ControlSend), when was sufficient change a bit in registry from 1 to 0 in the middle of binary word "ControlSizer" but need Structure deep Refresh .. and more other personal registry change. My hope never die. In future maybe member that will write a code that permit deep Refresh. I will wait.
AdamUL Posted September 6, 2013 Posted September 6, 2013 Your welcome, sorry I couldn't help you more. Somewhere there is likely a Windows message that can be sent to the window to change it, but finding which message is the problem. Try searching MSDN, and see if you come up with something. From some testing, I noticed that changing registry settings does not affect the current Explorer window, but it does for a new Explorer window. This is without having to restart the explorer.exe process. As another workaround, you could change the setting in the registry, and then relaunch the explorer window to the same location. This can be a hefty task depending on the location, as some folder are special in Windows. Adam
careca Posted September 6, 2013 Posted September 6, 2013 Dont mean to be disrespectful, but how did you ran the code Adam posted? Func _Update_Explorer() Local $bOld = Opt("WinSearchChildren", True) Local $aWinListSHELLDLL_DefView = WinList("[CLASS:SHELLDLL_DefView]") For $i = 0 To $aWinListSHELLDLL_DefView[0][0] DllCall("user32.dll", "long", "SendMessage", "hwnd", $aWinListSHELLDLL_DefView[$i][1], "int", 0x111, "int", 28931, "int", 0) Next Opt("WinSearchChildren", $bOld) EndFunc ;==>_Update_Explorer Just that? did you do something to it, or just paste 'n run? The reason i ask, is because as it is a function, if you don't 'point' to it, nothing happens, you know this right? just making sure... Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
mercadantelaura Posted September 7, 2013 Author Posted September 7, 2013 To "Careca" = I tested it using Call ( "function" [, param1 [, param2 [, paramN]]] ) ...and... also directly put it in script (as i wrote in the beginning of post at the end of example of registry change), unfortunately without obtain deep refresh of explorer structure. To "Melba23" Sorry i have done a stupid question for post code, i'm not a great observer. I have noted only now that the picture in your link is the shot of WEB forum Editor Toolbar and not toolbar of a specific Editor Program. Sorry for my carelessness. There is no Microsoft programmer in this forum to help me? :-; Thanks at any rate to all members that have lost time to looking for solve my problem.
Biatu Posted November 24, 2013 Posted November 24, 2013 (edited) looking for this too, need to reload icons. Yes, it does refresh icons, but making modifications like, desktop.ini, and +system attrib on folders....is not updated like an F5 key. Must be more messages were not sending. Edit: Sometimes F5 does not do it, you have to browse out of folder and back in, or restart explorer. Some program installers do this perfectly, i remember times tring to browser quickly through folders and clicking the wrong one because of a refresh. reset the icons, and the positions. (Without restarting Exp) Edited November 24, 2013 by Biatu What is what? What is what.
DigitalFacade82 Posted December 20, 2013 Posted December 20, 2013 Sorry for replying in an old thread, I just thought that it was relevant and it wasn't worth me starting a new thread. I have Win7 x64 and have had the same experiences as the OP. I wanted a *true* refresh of explorer though....not the solutions that I had seen on AutoIT so far...as most of them used just processclose.....which the OP knows doesn't work for his situation. What i have found out is a few things: An example like this: Run("explorer.exe",Call(ProcessClose("explorer.exe"))) Doesn't always work on Windows 7 x64? Anymore than say 4 or 5 explorer windows open and only the first one or two are refreshed...not all of them. advancing further with this to something like: Do Run("explorer.exe",Call(ProcessClose("explorer.exe"))) Until not ProcessExists("explorer.exe") EnvUpdate() Run("Explorer.exe") Next *sometimes works* effectively...but not always? (Why do computers *sometimes* choose to do things different? its like they have a mind of their own). However this most of the time ended up like taskkill command and so someone who had maybe 20 explorer windows open (for what ever reason) would soon find that they were back to desktop. Note: Say you have something like gImageX open and WIM file mounted. Then running this command is catastrophic! You close the mounted WIM instantly = not cool, lucky I had a program to diff my old mounting point and the new mounted WIM and I could push the work I created from one (my old mount point) to the new mounted WIM. Again so long as at least one explorer window running always then gImageX won't shut the open mount point. In the end with my situation I resorted to taskkill....which almost always results in the taskbar dead, new explorer windows appearing (but without the taskbar)...however it worked for the process I wanted to do (hint I was not satisfied with the Unlockers solution of would I like to delete the file next reboot option) anyway, from here I realised that taskkill IS effective, but not suitable for the reasons mentioned. However IF I selectively taskkill using PID for all explorer Windows but one at a time (so long as at least one explorer window is always open) then I don't have the problem of taskbar disappearing :-) My solution was to generate an array of open explorer windows by name or address. From the generated array I could prepare to create a new identical explorer window, kill the existing one and then fire off a new one. Loop through the array taskkilling each one and generating it's "clone" from the array. This worked! So long as I put a sleep command of at least 500 between each array record then I would always be left with at least one explorer window open before the next task was fired off. I used runwait for the taskkill command so the explorer from the array could be prepared to generate (not generated at the time or else taskkill would kill it) 500 was smallest amount of time that was effective. This enabled each explorer window to be refreshed 100% just like rebooting but with out the pain in the arse of loosing all the current open Windows explorer processes. Completely collapsing the Win Explorer is considered a bad solution for me, I could if I wanted to also segregate an explorer PID to not get updated at all should I want to in the future. I will post my script for you later if you like. Its on my other PC.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now