Modify

#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 Valik)

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 Valik, on Jul 8, 2009 at 7:03:02 PM

Description: modified (diff)

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).

comment:2 by koalw, on Jul 8, 2009 at 9:08:12 PM

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.

comment:3 by Ricky Valdivia <sistemas@…>, on Jul 22, 2009 at 5:40:46 PM

I have the same problem, please take a look to ticket 1083 and 1043!!!

regards

in reply to:  3 comment:4 by Valik, on Jul 22, 2009 at 6:51:39 PM

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 Valik, on Oct 17, 2009 at 12:51:12 AM

Severity: NoneBlocking

comment:6 by Jon, on Oct 17, 2009 at 4:45:34 PM

Milestone: 3.3.1.4
Resolution: Fixed
Status: newclosed

Fixed in version: 3.3.1.4

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.