Automatic Updater A, Main Program B1. Automatic Update B2 automatically when the main program is turned on. Timed to the server download profile and compare the local configuration file (registry) 3. If there is an update file, turn off the main program B -> Update file 4. Update the local configuration file and open the primary program B open the knowledge, 1.HTTP download, or FTP download
============ idHttpVar Downloadfile: tfilestream; beginio downloadfile: = TFileStream.create ('c: /aa.rar' ,fmcreate); idHttp1.get (' http://www.sina. Com.cn/download/aa.rar'ddownloadfile; DownloadFile.Free; End;
===========================
NMHTTP1.InputFileMode: = ture; NMHTTP1.Body: = 'local file'; NMHTTP1.Header: = 'Head.txt'; NMHTTP1.OutputFileMode: = FALSE; NMHTTP1.ReportLevel: = Status_Basic; NMHTTP1.Proxy: = 'Agent The server's IP address'; nmhttp1.proxyport: = 'proxy server port number'; with nmhttp1.headerinfo DO
Begincookie: = '; localmailaddress: ='; localprogram: = '; referer: ='; userid: = 'user name'; password: = 'user password'; end;
NMHTTP1.GET ('http://www.abcdefg.com/software/a.zip'); 2 How to write Windows service programs.