Marcus 0 Posted June 1, 2005 Here's a stumper.>ProcessExists("Explorer.exe") will return a PID even when the shell isn't deployed.AND>WinExists("Explorer.exe") will return 0 whether or not the shell is up.Looking for a way to reliably detect whether or not the Explorer is actually running as the shell (not just set in the system.ini or registry) in Windows with au3.Any thoughts???Thanks folks! [center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center] Share this post Link to post Share on other sites
MHz 80 Posted June 2, 2005 You could try to use one of the windows that explorer (shell) uses constantly. This example shows the taskbar, which displays it to hide for 5 seconds, then show it again. This has been tested on XP Pro.Opt("WinTitleMatchMode", 4) $handle = 'classname=Shell_TrayWnd' If WinExists($handle) Then WinSetState($handle, '', @SW_HIDE) Sleep(5000) EndIf If WinExists($handle) Then WinSetState($handle, '', @SW_SHOW) EndIfA utility to locate these hidden windows can be found here at Nirsoft. Share this post Link to post Share on other sites
CyberSlug 6 Posted June 2, 2005 Looking for a way to reliably detect whether or not the Explorer is actually running as the shell (not just set in the system.ini or registry) in Windows with au3.<{POST_SNAPBACK}>I'd still check the registry and ini keys...For WinXP, it's $shell = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "Shell")I believe the keys need to be set in order for the shell to work, but I could be wrong. I tried out some shell switcher program a few years ago, but I can't remember the name. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Share this post Link to post Share on other sites
Marcus 0 Posted June 2, 2005 @MHz: Thanks for the tip . . . Question: Why do we need to hide and then show the taskbar (if the shell is dead, the taskbar process should not exist???) to determine if it is viable? Wouldn't this work as reliably: Opt("WinTitleMatchMode", 4) $handle = 'classname=Shell_TrayWnd' If WinExists($handle) Then ;Do something to let the world know that Mr. Gates is on the prowl... EndIf ??? Thanks for the terrific input! @CyberSlug: Already got that in the code ... can change that (shell) value on the fly after boot -- Explorer may or may not have been invoked by the time a read is done Thanks for the help! [center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center] Share this post Link to post Share on other sites
DaleHohm 65 Posted June 2, 2005 With the new beta you can use COM to get a collection of the shell objects and then figure out all sorts of things about them:Dim $ObjShell = ObjCreate("Shell.Application") Dim $ObjShellWindows = $ObjShell.Windows(); collection of all ShellWindows (IE and File Explorer) For $item = 0 to ($ObjShellWindows.count - 1) $ObjIE = $ObjShellWindows.item($item); this is an InternetExplorer object etc.More information of the properties of the returned objects here: http://msdn.microsoft.com/library/default....netexplorer.aspDale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curlMSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object modelAutomate input type=file (Related)Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better?IE.au3 issues with Vista - WorkaroundsSciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Share this post Link to post Share on other sites
Marcus 0 Posted June 2, 2005 Thanks, Dale! Looks like there's good stuff in that litterbox. Need to get out my copy of the beta and scruff it up a bit BTW -- Any ETA on the final??? [center][font="Courier"][quote]Which end do you put the cheesecake in?[/quote][/font][/center] Share this post Link to post Share on other sites