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:
  1. Option Explicit
  2. Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
  3.     "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, _
  4.     ByVal szFileName As String, ByVal dwReserved As Long, _
  5.     ByVal lpfnCB As Long) As Long
  6.  
  7. Private Sub Form_Load()
  8. Dim url As String
  9. Dim localFileName As String
  10. Dim errcode As Long
  11.  
  12.  
  13. url = "http://www.mysite.com/myfile.txt"
  14. localFileName = App.Path & "\myfile.dat"
  15. errcode = URLDownloadToFile(0, url, localFileName, 0, 0)
  16.  
  17. End Sub