Jump to content

hidden script with send commands?

Recommended Posts


I have a question about the possibility (or syntax) of running a script in either minimized or hidden mode that uses the 'send' command. We're trying to standardize certain settings within our enterprise, such as default monitor power off, etc. The following script works, but I would like to make it run without the user seeing anything. I believe the use of the 'send' command as well as my trying to insure the correct window is active is what is causing me the problem, how to insure the window is active without it showing...

Run('rundll32.exe shell32.dll,Control_RunDLL Powercfg.cpl',@SystemDir,@SW_HIDE)
WinWait("Power Options Properties","Select the power sch")
If Not WinActive("Power Options Properties","Select the power sch") Then WinActivate("Power Options Properties","Select the power sch")
WinWaitActive("Power Options Properties","Select the power sch")


Any suggestions would be most appreciated.



Link to post
Share on other sites


When running in a Windows 2000 Environment u should consider the usage of Group Policies !


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


The enterprise it not fully migrated to AD as of yet, and in the past we have found that this particular setting (as well as some of the other power settings) do not always work as anticipated within the GPO's. I was planning on pushing the script out either SMS or during logon....



Edited by ZenKensei
Link to post
Share on other sites

The send command is not the best way to handle this issue because it can be interupted by the user.

I suggest using the ControlCommand ( "title", "text", controlID, "SelectString", 'string') to set the value in the combo box then ControlClick to apply the settings.

Edited by bshoenhair
Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...