Jump to content

Unable to hide Shell Windows


Recommended Posts

CODE
dim $Title, $Text

;Open Display Window and hide it
$Title = "Display Properties"
$Text = ""
RUN ("C:\WINDOWS\rundll32.exe shell32.dll,Control_RunDLL DESK.CPL","",@SW_HIDE) 
WinwAIT($Title,$Text)
local $A
$A = WinGetClassList("Display Properties")
MsgBox(0,"ClassList from Display Properties",$A)

Can anyone explain why the Display Properties Window is not Hidden?

Link to comment
Share on other sites

Hi,

u can do it like :

dim $Title, $Text

;Open Display Window and hide it
$Title = "Display Properties"
$Text = ""
RUN ("C:\WINDOWS\rundll32.exe shell32.dll,Control_RunDLL DESK.CPL","",@SW_HIDE)
WinwAIT($Title,$Text)

WinSetState("Display Properties","",@sw_hide)

local $A
$A = WinGetClassList("Display Properties")
MsgBox(0,"ClassList from Display Properties",$A)

Good Luck

What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
Link to comment
Share on other sites

CODE
dim $Title, $Text

;Open Display Window and hide it
$Title = "Display Properties"
$Text = ""
RUN ("C:\WINDOWS\rundll32.exe shell32.dll,Control_RunDLL DESK.CPL","",@SW_HIDE) 
WinwAIT($Title,$Text)
local $A
$A = WinGetClassList("Display Properties")
MsgBox(0,"ClassList from Display Properties",$A)

Can anyone explain why the Display Properties Window is not Hidden?

my guess is that it's hiding run32dll which then launches the display panel as a seperate window...

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to comment
Share on other sites

Yes Emmanuel. That is the problem. The rundll is a process that start an other one.

It is something like when we hide the @comspec & ' /c start commands. Only the Cmd window is hidden, the file you start it does not.

Edited by ezzetabi
Link to comment
Share on other sites

Thank you for these solutions, but this does not solve my problem...The display window flashes on the screen before the following Setstate Hide command hides the window... I am trying to run these window setup activities in the background..isn't their any way for autoit to stop this flash? Also the Windows spawned by Display Properties also flash before the SetState takes effect so I need a solution for the child windows too!

Link to comment
Share on other sites

I've wanted this, too!

An alternative would be to directly write/merge the registry keys that need changed. (But then you need to somehow tell Windows to apply the changes by restarting explorer.exe or by launching the Display Properties window and clicking the Apply button....)

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...