I agree with the others above, however, I know how it is when you want to make an updater and no-one will help..
NOTE: I AM NOT RESPONSABLE FOR WHAT YOU DO WITH THE CODE! REMEMBER MPGH DOES NOT ALLOW PROGRAMS TO ACCESS THE INTERWEBS WITHOUT SPECIAL REASONING WHICH GOES THROUGH A MINION FIRST!
either way here is an example download script, I am not sure how to check if the file is downloaded though...
You must import the following:
Code:
Imports System,IO (replace coma with period.)
Here is the download code:
Code:
My.Computer.Network.DownloadFile("https://yourwebsite.com/file.txt", "C:\FILE.txt", False, 60000)
Here is what each thing means, just ignore false it has to do with a login:
My.Computer.Network.DownloadFile("FILE LOCATION", "FILE DESTINATION", False, TIMEOUT)
Here is the execute code:
Code:
Process.Start("C:\file.txt")
#ateveroneelse
No offence to poster...
Do you really think someone who does not know how to do this can code something malicious???
EDIT: Here is a way to ask the user if they want to download the file:
Code:
Dim close As String
close = MsgBox("Do you want to download this file?", MsgBoxStyle.YesNo + MsgBoxStyle.Exclamation, "Downloader")
If close = vbYes Then
'CODE HERE
End If
@niels1189