Guest kbryant2 Posted June 3, 2004 Posted June 3, 2004 got a error testing the script before compiling. Is it the gear511.exe file it can not find or something else?: Line 13 (file "c:\documents and settings\kbryant2\my documents\runsoftwareasadmin.au3"): $val=runwait($runprogram, $runpath, @sw_maximize Error: unable to execute external program. the system can not find the specified file. Text of au3 script file executed: -------------------------------------------------------------------------------- Dim $UserName, $DomainName, $Password, $RunProgram, $RunPath $UserName = "administrator" $DomainName = "unit-02" $Password = "*********" $RunProgram = "Gear511.exe" $RunPath = "C:\Program Files\NETGEAR\WG511SCU\Utility" RunAsSet ( $UserName, $DomainName, $Password ) $val = RunWait($RunProgram, $RunPath, @SW_MAXIMIZE) --------------------------------------------------------------------------------
Developers Jos Posted June 3, 2004 Developers Posted June 3, 2004 try and see if that works: $val = RunWait($RunPath & "\" & $RunProgram, $RunPath, @SW_MAXIMIZE) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
pekster Posted June 3, 2004 Posted June 3, 2004 (edited) In your code, $RunProgram must contain the full path of the exe unless it is being run from the same directory as the script was executed from. You can't just set the working path and expect it to find your exe without telling it where to look. [Edit]: Programs that are in your %PATH% would be the exception to this rule. I believe you can run these from anywhere with the Run or RunWait functions. Edited June 3, 2004 by pekster [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
Guest kbryant2 Posted June 4, 2004 Posted June 4, 2004 Thanks that worked. After compiling I put the exe in the all users startup folder. Interestingly I get 2 gear511.exe processes running unless I logon with the admin account used in the script runas command. Does autoit have the ability to close a application in the systray? Kenny
pekster Posted June 4, 2004 Posted June 4, 2004 Does autoit have the ability to close a application in the systray?Yes, but it's always better to close an application by another way if possable. If you can send a switch to the program you wish to close, or detect it's hidden window, you should close it this way.You can use the PixelChecksum function to find a specific image. It gets more complicated if the tray hides inactive icons, because excatally where you have to click to open the tray fully changes as icons are hidden. With a little bit of playing around you should be able to detect a small part of the image you wish to click on, and then close it from the context menu. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
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