mistykz Posted December 28, 2010 Share Posted December 28, 2010 Hi everyone, I apologize in advance but I'm new to this and couldn't find an answer elsewhere. I'm trying to start an exe, and then have the script fill in two text fields and hit enter. I'm pretty sure I can get it to do the entry, but the problem I'm having is that I can't even get the program to execute in the first place. Here's what I'm using, pretty simple: Run("C:\Program Files\Teq WiD-ENT\Teq WiD-ENT.exe") When I run the script, nothing happens. If I replace that file path with a path to notepad, ms word, or other programs they open up just fine! I've also tried using RunAsWait, but again, nothing happens. When I open Teq Wid-ENT.exe by clicking on it manually, the UAC window pops up and asks me to continue or cancel. Could this be what's causing the problem? I just assumed that the window would pop up when I executed it via script. Any help/advice would be greatly appreciated! Link to comment Share on other sites More sharing options...
Varian Posted December 28, 2010 Share Posted December 28, 2010 Try #RequireAdmin at the top of the script. Other than that, make sure that you path is correct by running it from the command line or Run dialog Link to comment Share on other sites More sharing options...
Developers Jos Posted December 28, 2010 Developers Share Posted December 28, 2010 also some programs require the Workdir to be set to the correct directory. 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. Link to comment Share on other sites More sharing options...
Richard Robertson Posted December 28, 2010 Share Posted December 28, 2010 (edited) You need to put quotes around it since it has spaces in the path. Run('"C:\Program Files\Teq WiD-ENT\Teq WiD-ENT.exe"') Edited December 28, 2010 by Richard Robertson Link to comment Share on other sites More sharing options...
mistykz Posted December 28, 2010 Author Share Posted December 28, 2010 Adding #RequireAdmin worked, thanks! Although now it's asking for permission for AutoIT to make changes, not the program I'm running Odd. Link to comment Share on other sites More sharing options...
Ascend4nt Posted December 28, 2010 Share Posted December 28, 2010 mistykz,This is a known problem with 'CreateProcess' - see ticket # 1771. Hopefully it will be documented in the AutoIt Help file eventually.The best workaround is to use ShellExecute() for any process requiring elevation. This will remove any requirements for the script itself to be run with elevated privileges.Note however that if your script is running under a lesser privilege level, you may run into some automation problems. My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
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