Wao... a ver...
Primero que nada, debemos descargar el archivo (Instalador del juego) y Luego ejecutarlo, fijate en este source.
Objetos:
Boton: Command1
Caja de Texto: Text1
Source en un Formulario:
Option Explicit
Private Const BIF_RETURNONLYFSDIRS = 1
Private Const MAX_PATH = 260
Private Type BrowseInfo
hWndOwner As Long
pIDLRoot As Long
pszDisplayName As Long
lpszTitle As Long
ulFlags As Long
lpfnCallback As Long
lParam As Long
iImage As Long
End Type
Private Declare Sub InitCommonControls Lib "comctl32.dll" ()
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 Declare Sub CoTaskMemFree Lib "ole32.dll" ( _
ByVal hMem As Long)
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" ( _
ByVal lpString1 As String, _
ByVal lpString2 As String) As Long
Private Declare Function SHBrowseForFolder Lib "shell32" ( _
lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32" ( _
ByVal pidList As Long, ByVal lpBuffer As String) As Long
Function DownloadFile(strURL As String, strDestination As String)
Call URLDownloadToFile(0, strURL, strDestination, 0, 0)
End Function
Function GetFileName(strURL As String) As String
Dim fName() As String
fName = Split(strURL, "/")
GetFileName = fName(UBound(fName))
End Function
Function GetPath(f As Form) As String
Dim iNull As Integer
Dim lpIDList As Long
Dim lResult As Long
Dim sPath As String
Dim udtBI As BrowseInfo
With udtBI
.hWndOwner = f.hWnd
.lpszTitle = lstrcat("C:\", "")
.ulFlags = BIF_RETURNONLYFSDIRS
End With
lpIDList = SHBrowseForFolder(udtBI)
If lpIDList Then
sPath = String$(MAX_PATH, 0)
SHGetPathFromIDList lpIDList, sPath
CoTaskMemFree lpIDList
iNull = InStr(sPath, vbNullChar)
If iNull Then
sPath = Left$(sPath, iNull - 1)
End If
End If
GetPath = sPath
End Function
Private Sub Command1_Click()
'Text1.Text es el URL del archivo: http://www.google.com/descargar/GForce.exe
'por ejemplo!!!!
DownloadFile Text1.Text, "C:\" & GetFileName(Text1.Text)
Shell "C:\" & "GForce.exe", vbNormalFocus 'Suponiendo que es el que descargaste!
End Sub
Bien, con eso descargamos el archivo y lo instalamos... Si te da errores o algún problema postea. Saludos.
PD: Fijate en el Codigo donde coloco "C:\". Alli puedes sustituirlo por cualquier ruta, incluso leerla desde un Text, podrías personalizarlo. Todo depende de como quieras hacerlo.
Aprende a usar el buscador, la verdad aveces los usuarios tienen las respuestas en sus narices y no se toman la molestia de buscar!