| InstallSite · E-mail and password recovery note · Contact |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
Only for (pure) InstallScript projects![]() ![]() ![]() |
| rjprasadch |
|
|
Group: Full Members Posts: 20 Member No.: 14880 Joined: 2008-08-27 |
Hi,
We are using installshield and we are having one installscript project. We have a below requirement. One text file will be there in a particualar website and we need to download that text file from the web and need to copy the file in c:\ drive in the local machine. For this requirement, we are trying with XCopyFile(), but it is not working. Can anyone please let me know how we can download a file from the web in Installscript projects. Whether we can use XCOpy file or any other features are there. For example, my requirement is “need to download a file “Test.txt” from www.yahoo.com and copy the downloaded file in C:\ drive in local machine.How to do this in installscript projects. Thanks for your help in advance |
| Taco Bell |
Posted: 2010-07-26 14:39
|
|
IS6 Expert Group: Moderators Posts: 1190 Member No.: 1868 Joined: 2001-10-12 |
I would recommend that you try using CopyFile() instead of XCopyFile() since it's just one file and since I've successfully used that to download files from a web site.
-------------------- ![]() |
| rjprasadch |
Posted: 2010-07-26 15:20
|
||
|
Group: Full Members Posts: 20 Member No.: 14880 Joined: 2008-08-27 |
Thanks for your rely. Using XCopyfile, i have tried with following piece of code.But it is not working. Can you please let me know if i am missing anything in the below code. Can you please let me know whether URL mentioned is in the correct format. #define SDIR "https:\\www\\yahoo.com\" #define TDIR "C:\\File Download\\" STRING szSrcFile; begin szSrcFile = "Test.txt"; if (XCopyFile (SDIR ^ szSrcFile, TDIR ^ "*.*", COMP_NORMAL) < 0) then MessageBox ("XCopyFile failed", SEVERE); else MessageBox ("Text files successfully copied.", INFORMATION); endif; end; |
||
| Taco Bell |
Posted: 2010-07-27 14:59
|
|
IS6 Expert Group: Moderators Posts: 1190 Member No.: 1868 Joined: 2001-10-12 |
Well, looking at your code, I was using a unsecured web site as opposed to a secure web site.
However, I also see a typo in the SDIR constant as it should be "www.yahoo" instead of "www\\yahoo". -------------------- ![]() |
| Glytzhkof |
Posted: 2010-07-28 02:07
|
|
Group: Moderators Posts: 1322 Member No.: 5425 Joined: 2002-10-30 |
Just for the record: downloading files from the Internet from your setup.exe is considered very bad practice. If you are targeting larger corporations with the software it is a great way to get your product axed since solving these designs for deployment via system accounts over the network is a bleeding nightmare. I have worked with deployment solutions in large companies, and deployment problems is high on the list of reasons to eliminate products when selecting...
I would only consider doing this if the target group does not include large corporations, the installation base is small and the design genuinely contributes positively to the overall "ease of use" for the user. In other words it really eliminates tedious manual setup for the user. A simple alternative solution is to have your main application EXE file perform the download of the file after the installation is complete. Apart from corporate deployment problems, Internet usage from the setup can also trigger serious deployment problems in relation to anti virus software, firewalls and perhaps even network issues with NAT translation (though this isn't so much of a problem these days I think). A failed setup experience means your product literally never gets evaluated and appreciated for whatever it is. The setup failure is a great place to give up for people with options. -------------------- Regards
-Stein Åsmul |
![]() |
![]() ![]() ![]() |