ShellCommand Changed?

Jim Ault JimAultWins at yahoo.com
Mon Apr 2 18:38:38 EDT 2007


On 4/2/07 11:39 AM, "Ken Ray" <kray at sonsothunder.com> wrote:

>   if char -7 to -1 of the shellCommand = "cmd.exe" then
> 
> (although the likelihood there might be "cmd.exe" in the path and have
> it NOT be the target file is extremely small).

Perhaps this would be a little safer:


 if char -8 to -1 of ("\" & the shellCommand) = "\cmd.exe" then

Jim Ault
Las Vegas

On 4/2/07 11:39 AM, "Ken Ray" <kray at sonsothunder.com> wrote:

> On Mon, 02 Apr 2007 10:50:57 -0700, Scott Rossi wrote:
> 
>> When starting up Rev 2.8 on Windows (Vista), the shellCommand property is
>> set to "cmd.exe".  After running revGoURL to launch a Web browser, the
>> shellCommand is set to the full disk path to cmd.exe.
>> 
>> Is this expected behavior?  I believe this breaks previous usage of shell
>> command, in that now one must script:
>> 
>>  if "cmd.exe" is in the shellCommand...
>> 
>> Or did this change some time ago and I just missed it?
> 
> Yup, I just checked, and this goes all the way back to 2.1.2. I didn't
> know this was the case however, so you're right - any code that does:
> 
>   if the shellCommand = "cmd.exe" then
> 
> will fail and you'd need to use the "is in" construct you mentioned
> above. To be 100% sure, you'd need to do this:
> 
>   if char -7 to -1 of the shellCommand = "cmd.exe" then
> 
> (although the likelihood there might be "cmd.exe" in the path and have
> it NOT be the target file is extremely small).





More information about the use-livecode mailing list