How do I collect installation data and send it to my web server?AnswerSometimes an installation package may need to collect installation data and send it to your web server. You may need to collect, by means of Windows Installer properties, usage information statistics, hardware information, or user information such as:
What information to collect ?You need to specify what information should be collected and sent to your web server. Install information can only be collected through Windows Installer properties (their values). You can specify what property values should be collected by enumerating their names in the Advanced Installer special property called: HttpPostCollectData, separated by ; . For example, if you want to collect the user name, the company name, the user's email, and his language, you set the property HttpPostCollectData with the value: USERNAME;COMPANYNAME;USER_EMAIL;UserLanguageID. (Some built-in Windows Installer properties are automatically set by the package, other custom properties must be set by means of package UI or custom actions.) Where to submit the collected information ?You can specify the URL where the collected information should be submitted in the Windows Installer property: HttpPostUrl. For instance, set the HttpPostUrl property with the value: http://www.example.com/myapp/collectdata.php. Your web server must host a web application capable of processing and storing the received information. You can use the Apache/PHP/MySQL suite, or IIS/ASP.NET/MS-SQL suite, or any other web technology convenient to you. How the collected information is sent ?The web transfer protocol is HTTP/1.1 or HTTPS (depending on the URL you specify). The submit request method is POST. The HTTP headers specify the following "Content-Type": Content-Type: application/x-www-form-urlencoded; charset=utf-8 Advanced Installer will send every property you specify in HttpPostCollectData as a POST variable, with its value set according to the installation state. In the above example, the following POST variables will be set:
Web Server ResponseThe HTTP server request response, if any, can be accessed through the Advanced Installer; property: HttpPostServerResponse. You can use the value of this property to organize the logic of your installation package.
How to useIn your Advanced Installer project
Go to Events Editor tab (Dialog Editor view) and add the following published events on the button: Add two SetProperty events for the "HttpPostUrl" and "HttpPostCollectData" properties.
Add a DoAction event which will execute the HTTP POST operation.
In your web server applicationYour web application should be able to handle retrieving POST variables send by the installer package. In this case, the following variables will be POSTed: USERNAME, COMPANYNAME, USER_EMAIL, UserLanguageID. You can choose to use the collected information as you need, as long as you disclose to your client what data you collect and for what purpose.
Privacy Policy
| |
|
| Privacy Policy | Windows Installer | Search Engine Ranking | Link Analyzer | ||
| © 2002 - 2008 Caphyon Ltd. Trademarks belong to their respective owners. All rights reserved. | ||