i want to know that how can we download file in visual basic silently without notifying users .... its my application update , also how could we create thread in visual basic so that this thread always check for updates and downloads silently
You can't download silently because that would violate computer security although there are probably ways to get around that. The only reason I can think of why you would even want to do that is if you are writing a virus or something like that.
I used to do this all the time for corporate apps. It was critical that the users ran the current version of the software so the apps had a front end that would compare the date/time stamps of all installed modules to those on the server. Any new modules were copied to the user's PC before the app was actually loaded. I used a common launcher.exe that took three parameters
The browser you are using is siliently downloading stuff all the time. It is a matter of do you trust the program.
I use a third party Firewall to block everything unless I grant it permission. However, once you grant a program access to the internet, there is very little you can do about controlling what it downloads. That is where a good anti-virus program comes in that scans internet traffic for the obvious stuff.
Granted, polite programs ask for permission. i.e. Check for Updates, download updates automatically, etc.
I'll bet your programs did not do it siently without user knowledge.
Actually, it did. And that was at the users' request. They didn't care about updates or being informed about what version they were using. All they cared about was that the software worked. When you are an operator controlling many billions of dollars of equipment and ensuring that power gets delivered reliably to a million local customers and to neighbouring provinces and states you have better things to do than acknowledge message boxes that do nothing more than tell you that everything is working. It's when things aren't working that you need the alerts.
Am using visual studio 2012 for my vb project i tried above links
current code is but not working
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)
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
Label4.Text = lngRetVal
Private Sub Form_Load()
I agree with Jim on this. Also making use of silent downloads. Obviously the necesarry approval was obtained when a new installation was made to a client. After that it is our responsibility to see that the app runs 100%.
@TnTinMN, agreed. All the installer has to do is to ensure that your app is cleared through all AV and FW's, then compare the versions and download when needed. It IS nice to see Jim and AD in here as well. :)