Modify

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 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, 17 years ago

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

comment:3 by Ricky Valdivia <sistemas@…>, 17 years ago

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

regards

in reply to:  3 comment:4 by Valik, 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 Valik, 16 years ago

Severity: NoneBlocking

comment:6 by Jon, 16 years ago

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.