Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Is(FILE_EXISTS, <filename>) = TRUE does not work..


4 replies to this topic

BillyT

BillyT
  • Members
  • 4 posts

Posted 30 October 2002 - 21:01

I have used this function successfully many times and in many setups providing the file name is not an internet URL:

if (Is(FILE_EXISTS, "c:\filename.ext") = TRUE) then
      blahblahblah();
endif;

However, when I try to use the function with an internet URL as the source, it does not work:

if (Is(FILE_EXISTS, "http://www.something.com/update/filename.ext") = TRUE) then
      blahblahblah();
endif;

It tells me the file does not exist even though I know it does.

I would think that it should work, especially because I specified the full file name.  XCopyFile works without error when I specify the full name and path of a file in URL form and will successfully copy a file from a URL address to a target folder.  However, I cannot find a way "within Installshield script" to test for the existence of a file on a URL path.

Any ideas?

Also, I want to call FileCompare(...) with an internet URL to a file as one of the parameters, but I haven't gotten to that part yet.  Does anyone know if this function will have similar troubles?

Best Regards,
Bill T.
bill.tello@systoc.com

Xitch13

Xitch13
  • Members
  • 134 posts

Posted 30 October 2002 - 23:42

Never tried to do anything like that, but some of the questions I would have if I tried that would be

A) Has the script check for an open connection to the internet?

B) Wouldn't the script need some browser functionality to perform that search?
There is great chaos under heaven, and the situation is excellent. (Mao Tse Tung)

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 31 October 2002 - 03:22

Ditto Xitch13.  I don't think those IS functions were designed for Internet URLs, but I could be wrong.


user posted image

EberhardH

EberhardH
  • Members
  • 137 posts

Posted 31 October 2002 - 07:46

Totally agree with TacoBell00 and Xitch13.
This function was never meant to check the existance of an internet file (how should it be able to do this - it would need some web browser functionality).

BillyT

BillyT
  • Members
  • 4 posts

Posted 31 October 2002 - 16:39

Thanks for your replies.

I've already suspected as much, but I have issued a bug report to Installshield in the hopes that they'll take it as a suggestion for future enhancement.

It seems I'm always climbing uphill into uncharted territories.  ;)

Here is how I have gotten around these problems:

I have already been able to download files by using the IS 6.31 XCopyFile function. It works quite nicely providing you pass the full URL path and file name. Unfortunately, it does not work with wildcards in order to download all of the files on a URL path. However, I have been able to get by that by parsing a files.lst file that I create with the "dir /s" command to provide me the file names I want to download. I download this file before I download anything else.

As I'm using the XCopyFile function to move the files from an internet URL to the target location selected by the user, I cannot to my knowledge rely on the File Group properties "Newer Files" mechanism to do the download only if the file is newer.

It also makes no sense to download the file first to determine if it is newer as I really only wanted to download the file if it is newer in the first place to avoid downloading files I don't need to and wasting bandwidth.

So, my recourse I have determined is to further parse the files.lst file that I generate in order to determine the date, time and size of a file in order to determine if it is indeed newer before I download it.

Best Regards,
Bill T.
bill.tello@systoc.com