Borje Posted December 20, 2018 Posted December 20, 2018 (edited) Hi I have this little script and that works perfect in windows XP but now I has go to Windows 7 and now that not update the explorer what is the problem in the code? expandcollapse popup$RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" If RegRead($RegKey, "ShowSuperHidden") Then SplashTextOn("","Not schow Superhidden","200","30","-1","-1",35,"Verdana","10","400") sleep(500) RegWrite($RegKey, "ShowSuperHidden", "REG_DWORD", 0) Else SplashTextOn("","Show Superhidden","200","30","-1","-1",35,"Verdana","10","400") RegWrite($RegKey, "ShowSuperHidden", "REG_DWORD", 1) sleep(500) EndIf UpdateExplorer() Func UpdateExplorer() $WinExpListArr = _ExplWinGetList() If IsArray($WinExpListArr) Then For $iWin = 1 To $WinExpListArr[0] $GetWinState = WinGetState($WinExpListArr[$iWin]) $Hwnd = WinGetHandle($WinExpListArr[$iWin]) DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0) Next EndIf Opt("WinTitleMatchMode", 4) $Hwnd = WinGetHandle("classname=Progman") DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0) EndFunc Func _ExplWinGetList() Opt("WinTitleMatchMode", 4) $WinList = WinList("classname=CabinetWClass") If IsArray($WinList) Then Local $WinListArr[$WinList[0][0]+1] For $iW = 1 To $WinList[0][0] $WinListArr[$iW] = $WinList[$iW][0] Next $WinListArr[0] = $WinList[0][0] Return $WinListArr Else Return "" EndIf EndFunc Edited December 20, 2018 by Borje
careca Posted December 20, 2018 Posted December 20, 2018 Permissions could be one problem, try #requireadmin 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
Borje Posted December 20, 2018 Author Posted December 20, 2018 Hi careca I have already test that but that is not works..
Moderators JLogan3o13 Posted December 20, 2018 Moderators Posted December 20, 2018 @Borje "It doesn't work" doesn't help anyone. What errors are you getting, or what are you expecting to happen and what happens instead. Instead of simply posting code with "it's broke" and asking folks to guess, help us help you. See the link in my signature on what we need from you in order to assist. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Nine Posted December 20, 2018 Posted December 20, 2018 (edited) regread has changed in x64 vs x86, try this : Global $sHKLM32 = @AutoItX64 = 1 ? "HKLM\SOFTWARE\WOW6432NODE" : "HKLM\SOFTWARE" Global $sHKLM64 = @AutoItX64 = 1 ? "HKLM\SOFTWARE" : "HKLM64\SOFTWARE" Global $sHKLM = @OSarch = "X64" ? $sHKLM64 : $sHKLM32 add the rest of the key after...in your case it is HKCU tho ! Edited December 20, 2018 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
careca Posted December 20, 2018 Posted December 20, 2018 Consider this If RegRead($RegKey, "ShowSuperHidden") Then Could you try this way? If RegRead($RegKey, "ShowSuperHidden") = 0 Then I think that maybe because this is not a matter of true or false, the result was always 1 to me, but this way the value is retrieved correctly. 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
Nine Posted December 20, 2018 Posted December 20, 2018 5 minutes ago, careca said: the result was always 1 to me, mine is at 0 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
orbs Posted December 20, 2018 Posted December 20, 2018 (edited) @Borje, the identification for Windows Explorer windows is different for different operating systems. i stumbled upon this while writing this little app: from which you can copy this function: Func _Update_Explorer() ; ref: https://www.autoitscript.com/forum/topic/95139-update-refresh-windows-explorer/ Local $bOld = Opt("WinSearchChildren", True) Local $a = WinList("[CLASS:SHELLDLL_DefView]") For $i = 0 To UBound($a) - 1 DllCall("user32.dll", "long", "SendMessage", "hwnd", $a[$i][1], "int", 0x111, "int", 28931, "int", 0) Next Opt("WinSearchChildren", $bOld) EndFunc ;==>_Update_Explorer Edited December 20, 2018 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates WinPose - simultaneous fluent move and resize Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Magic Math - a math puzzle Demos: Title Bar Menu - click the window title to pop-up a menu
Borje Posted December 20, 2018 Author Posted December 20, 2018 Hi Orbs Thank you I have test this example you give me and it works perfect, the problem was update explorer after the registry settings was made, but now I understand that is differnt based on the operating system.
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