Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1743 closed Bug (No Bug)

fileexists

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

I'm getting different results from the below two examples

;displays msgbox
$craw="C:\Program Files\Internet Explorer\iexplore.exe"
if fileexists($craw) then msgbox(0,$craw,"",0)


;does not display msgbox
$craw=$CmdLineRaw
if fileexists($craw) then msgbox(0,$craw,"",0)

;$cmdlineraw would be populated with
;"C:\Program Files\Internet Explorer\iexplore.exe"
;when executed with same command line parameter.

;C:\Program Files\Internet Explorer\iexplore.exe)

Attachments (0)

Change History (4)

in reply to:  description ; comment:1 by anonymous, 16 years ago

Clarification; this was produced from putting a shortcut into sendto folder where
one could then right click and send .exe to the autoit exe
In this scenario if the cmdline parameter does not have any spaces in the path
it works. i.e. instead of C:\Program Files\Internet Explorer\iexplore.exe
d:\programs\abc.exe was used instead.

oddly enough if I typed the command with path (with spaces and without) in the CMD prompt it works as intended.

It seem like an issue with how sendto supplies the path.

Replying to anonymous:

I'm getting different results from the below two examples

;displays msgbox
$craw="C:\Program Files\Internet Explorer\iexplore.exe"
if fileexists($craw) then msgbox(0,$craw,"",0)


;does not display msgbox
$craw=$CmdLineRaw
if fileexists($craw) then msgbox(0,$craw,"",0)

;$cmdlineraw would be populated with
;"C:\Program Files\Internet Explorer\iexplore.exe"
;when executed with same command line parameter.

;C:\Program Files\Internet Explorer\iexplore.exe)

in reply to:  1 comment:2 by anonymous, 16 years ago

Ok, apologies; this may not be a bug afterall
sendto is supplying the commandline path with quotes
"C:\Program Files\Internet Explorer\iexplore.exe"
and fileexists does not appear to handle it properly when quoted.

zzz "C:\Program Files\Internet Explorer\iexplore.exe" (fails)
zzz C:\Program Files\Internet Explorer\iexplore.exe (works)

Replying to anonymous:

Clarification; this was produced from putting a shortcut into sendto folder where
one could then right click and send .exe to the autoit exe
In this scenario if the cmdline parameter does not have any spaces in the path
it works. i.e. instead of C:\Program Files\Internet Explorer\iexplore.exe
d:\programs\abc.exe was used instead.

oddly enough if I typed the command with path (with spaces and without) in the CMD prompt it works as intended.

It seem like an issue with how sendto supplies the path.

Replying to anonymous:

I'm getting different results from the below two examples

;displays msgbox
$craw="C:\Program Files\Internet Explorer\iexplore.exe"
if fileexists($craw) then msgbox(0,$craw,"",0)


;does not display msgbox
$craw=$CmdLineRaw
if fileexists($craw) then msgbox(0,$craw,"",0)

;$cmdlineraw would be populated with
;"C:\Program Files\Internet Explorer\iexplore.exe"
;when executed with same command line parameter.

;C:\Program Files\Internet Explorer\iexplore.exe)

comment:3 by J-Paul Mesnage, 16 years ago

Resolution: No Bug
Status: newclosed

comment:4 by J-Paul Mesnage, 16 years ago

Next time go to forum first to get hints ...

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


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