Modify

Opened 16 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 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

Change History (6)

comment:1 Changed 16 years ago by Valik

  • 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 Changed 16 years ago by koalw

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 follow-up: Changed 16 years ago by Ricky Valdivia <sistemas@…>

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

regards

comment:4 in reply to: ↑ 3 Changed 16 years ago by Valik

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 Changed 16 years ago by Valik

  • Severity changed from None to Blocking

comment:6 Changed 16 years ago by Jon

  • Milestone set to 3.3.1.4
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version: 3.3.1.4

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.