I use the below code to check and download updates for my app. The problem i've run into is if a user has a Download Manager enabled (eg. DAP), the Downlad Manager downloads the file and overwrites my code as to where the file should be downloaded to.
Is there a way I can disable the Download Manager or another way to over come my problem?
VB Code:
Option Explicit Private Declare Function URLDownloadToFile Lib "urlmon" Alias _ "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, _ ByVal szFileName As String, ByVal dwReserved As Long, _ ByVal lpfnCB As Long) As Long Private Sub Form_Load() Dim url As String Dim localFileName As String Dim errcode As Long url = "http://www.mysite.com/myfile.txt" localFileName = App.Path & "\myfile.dat" errcode = URLDownloadToFile(0, url, localFileName, 0, 0) End Sub
