I would like to read a text file containing a version number from the Internet resource. Then I need to use this version number within my script.
How to do this in InnoSetup ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are many ways how to get a file from the Internet in InnoSetup. You can use an external library like for instance
InnoTools Downloader, write your own library, or use one of the Windows COM objects. In the following example I’ve used theWinHttpRequestCOM object for file receiving.The
DownloadFilefunction in this script returns True, when the WinHTTP functions doesn’t raise any exception, False otherwise. The response content of the HTTP GET request to an URL, specified by theAURLparameter is then passed to a declaredAResponseparameter. When the script fails the run on exception,AResponseparameter will contain the exception error message: