Opened 17 years ago
Closed 16 years ago
#1060 closed Bug (Fixed)
Run return 0, but failed
| Reported by: | anonymous | Owned by: | Jon |
|---|---|---|---|
| Milestone: | 3.3.1.4 | Component: | AutoItX |
| Version: | 3.3.0.0 | Severity: | Blocking |
| Keywords: | Cc: |
Description (last modified by )
When I use a long argument(more than 120 char) for functions:
Run, RunWait etc, ExitCode off started programm always = 0, but programm not started.
An examples (ex1-work, ex2 doesnt):
ex1:
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
val = oAutoIt.RunWait("calc.exe anParamThatLessThan120Char", "C:\WINDOWS", oAutoIt.SW_MAXIMIZE)
' script waits until Notepad closes
WScript.Echo "Program returned with exit code:" & val
Result: Calc started
ex2:
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
val = oAutoIt.RunWait("calc.exe anParamThatMoreThan120CharForExample121charAndEtc_forCheckThisMakeThisStringLEnMoreThan120charsRealyMoreThan120ThankForYourSupport", "C:\WINDOWS", oAutoIt.SW_MAXIMIZE)
' script waits until Notepad closes
WScript.Echo "Program returned with exit code:" & val
Result: cals isnt started, but Msbox says that calc returns 0 as exitcode
Thanks
Attachments (0)
Change History (6)
comment:1 by , 17 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 17 years ago
Sorry for my previous post.
I check that Run\RunWait returns 1 to @error for example 2. Its ok, its realy failed.
But.. where I can get information about len of cmd and parameters?
I create a stupid vbs script, that starts calc with any len of parameters(much more that 120 chars).
And I can start Calc again wtih any len of parameter throw windows shell(cmd).
I check documenation again - it has information that max len of any script line can be =4096 chars. And nothing about len for Run\Runwait family cmds.
Situation was reprodused on WinXP SP3 x86 and on Win2003 SP1 x86.
Thanks again.
follow-up: 4 comment:3 by , 17 years ago
I have the same problem, please take a look to ticket 1083 and 1043!!!
regards
comment:4 by , 17 years ago
Replying to Ricky Valdivia <sistemas@…>:
I have the same problem, please take a look to ticket 1083 and 1043!!!
regards
Do not shill for other tickets.
comment:5 by , 16 years ago
| Severity: | None → Blocking |
|---|
comment:6 by , 16 years ago
| Milestone: | → 3.3.1.4 |
|---|---|
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed in version: 3.3.1.4

Please read WikiStart to learn how to properly post code on the issue tracker. In case you didn't notice: This isn't the forum.
Now, as for the ticket itself... okay, and? The documentation clearly states to check the error property on the AutoItX3 object to see if a call to Run() or RunWait() failed. I don't see you checking that property so the return value of 0 is expected.
Finally, I am pretty sure this is not a bug. There are OS-imposed limits on the length of the command line and its parameters. I'll test it but I don't expect to find a problem in AutoIt(X).