IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VBScript Discussion :

Exemple de Menu en HTA avec Password et Limite de nombre d'essais


Sujet :

VBScript

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2011
    Messages
    62
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Janvier 2011
    Messages : 62
    Points : 50
    Points
    50
    Par défaut Exemple de Menu en HTA avec Password et Limite de nombre d'essais
    Bonjour,

    J'ai trouvé sur ce forum ce code, dont je remercie l'auteur, qui pourrait m'être très utile.

    J'aimerais cependant retirer le contrôle du mot de passe svp qui lui ne me sert à rien

    J'ai tenté plusieurs choses mais la modification de la source induit des erreurs dans la suite de l'execution

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    <HTML><HEAD> 
     <TITLE></TITLE> 
     <HTA:APPLICATION 
     APPLICATIONNAME="Exemple de Menu en HTA" 
     BORDER="THIN" 
     BORDERSTYLE="NORMAL" 
     ICON="Explorer.exe" 
     INNERBORDER="NO" 
     MAXIMIZEBUTTON="NO" 
     MINIMIZEBUTTON="NO" 
     SCROLL="NO" 
     SELECTION="NO" 
     SINGLEINSTANCE="YES"/></HEAD> 
     <META HTTP-EQUIV="MSThemeCompatible" CONTENT="YES"> 
     <BODY TOPMARGIN="1" LEFTMARGIN="1"><CENTER><DIV><SPAN ID="ONSCR"></SPAN></DIV></CENTER></BODY>
     
     <SCRIPT LANGUAGE="VBScript"> 
     Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
    Dim WS : Set WS = CreateObject("wscript.shell")
    Temp = WS.ExpandEnvironmentStrings("%Temp%")
    Essais = Temp &"\Essais.txt"
    Sub window_onload()
           CenterWindow 230,130
           Call TextFocus
    Dim Compteur : Compteur = 0
    If Not objFSO.FileExists(Essais) Then 
    Dim Logfile : Set Logfile = objFSO.OpenTextFile(Essais,2,True)
    Logfile.writeline Compteur
    Logfile.Close
    end if
    End Sub
     
        Sub CenterWindow(x,y)
            window.resizeTo x, y
            iLeft = window.screen.availWidth/2 - x/2
            itop = window.screen.availHeight/2 - y/2
            window.moveTo ileft, itop
        End Sub
     
    Sub PasswordForm()
    Self.document.title = "Mot de passe"
    Self.document.bgColor = "#BBBFFF"
    ONSCR.InnerHTML="<center><FONT COLOR=""#FFFFFF"" SIZE=""+1"" FACE=""VERDANA,ARIAL,HELVETICA,SANS-SERIF"">Mot de Passe</FONT<br><input type=""password"" name=""PasswordArea"" size=""20"" onKeyUp=""TextFocus""><P>"_
    &"<input  type=""Submit"" STYLE=""HEIGHT:25;WIDTH:110"" value=""Accès Au Menu"" name=""run_button""  onClick=""VerifPass"">"_
    END Sub
     
    Sub VerifPass
    Dim NB_Essais_MAX : NB_Essais_MAX = 3
    Password = "123"
    Set Readfile = objFSO.OpenTextFile(Essais,1)
    Compteur = Readfile.ReadAll
    Readfile.Close
    Controle = True
    While Controle
            Compteur = Compteur + 1
            NB_Essais_Restant = NB_Essais_MAX - Compteur
            Set Logfile = objFSO.OpenTextFile(Essais,2,True)
            Logfile.writeline Compteur
            Logfile.Close
    		If PasswordArea.Value <> Password Then
    		     MsgBox "Mauvais Mot de passe et NB° ESSAIS est " & Compteur &vbCr&_
    		     "Le Nombre d'essais restant est "& NB_Essais_Restant,16,"Mauvais Mot de passe"
    		     Location.Reload(True)
    		end if
    		If PasswordArea.Value = Password Then
     
    		    MsgBox "Mot de Passe Correct !",64,"Mot de Passe Correct !"
    		      If objFSO.FileExists(Essais) Then objFSO.DeleteFile Essais,True
    		         Controle = False
    		         Call MenuPrincipal()
    			Exit Sub
    	    End If
    	      If Compteur = NB_Essais_MAX Then
    		     If objFSO.FileExists(Essais) Then objFSO.DeleteFile Essais,True
        	       MsgBox "Le Nombre Limite d'essais est atteint ! "&vbcr& "L'ordinateur va Rebooter dans 30 secondes ",48,"Le Nombre Limite de Essai est atteint"
        	       Command="cmd /c Shutdown.exe -r -t 30 -c " & chr(34) & "Sauvegarder votre Travail car l'ordinateur va rebooter dans 30 secondes" & chr(34)
        	       'Executer = WS.Run(Command,0,False) 
        	       window.close
                 End If
        	Exit Sub
    wend	 
    End Sub
     
    Sub TextFocus
      PasswordArea.Focus 
    End Sub
     
    SUB MenuPrincipal() 
    Self.document.title = "Exemple de Menu en HTA"
     CALL InnerWindowSize(222,587) 
     ONSCR.InnerHTML="<TABLE HEIGHT=""50"" WIDTH=""220"" BORDER=""1"" BGCOLOR=""#BBBFFF"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_ 
     &"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><FONT COLOR=""#FFFFFF"" SIZE=""+2"" FACE=""VERDANA,ARIAL,HELVETICA,SANS-SERIF"">Menu Principal</FONT></CENTER></TD></TR></TABLE>"_ 
     &"<TABLE WIDTH=""220"" HEIGHT=""184"" BORDER=""1"" BGCOLOR=""#BBBFFF"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_ 
     &"<P><TR><TD><CENTER><INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Lançer la Calcuatrice"" ONCLICK=""Run(1)""><P>"_ 
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Internet Explorer"" LANGUAGE=""VBScript"" ONCLICK=Run(2)><P>"_ 
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Ligne de Commande"" LANGUAGE=""VBScript"" ONCLICK=Run(3)><P>"_ 
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Poste de Travail"" ONCLICK=""Run(4)""><P>"_ 
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Corbeille"" ONCLICK=""Run(5)""><P>"_
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Mes Documents"" ONCLICK=""Run(6)""><P>"_
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Programs Files"" ONCLICK=""Run(7)""><P>"_
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Ajouter/Supprimer APPLI"" ONCLICK=""Run(8)""><P>"_
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Panneau de configuration"" ONCLICK=""Run(9)""><P>"_
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Propriétés d'Affichage"" ONCLICK=""Run(10)""><P>"_
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Bloc Notes"" ONCLICK=""Run(11)""><P>"_
     &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""WinWord"" ONCLICK=""Run(12)""><P>"_
     &"</TD></CENTER></TR></TABLE>" 
     END SUB 
     
     SUB InnerWindowSize(intWidth,intHeight) 
     Self.ResizeTo intWidth,intHeight 
     Self.ResizeTo intWidth+(intWidth-Document.Body.OffsetWidth),intHeight+(intHeight-Document.Body.OffsetHeight) 
     Self.MoveTo (Screen.Width/2)-(intWidth/2),(Screen.Height/2)-(intHeight/2) 
     END SUB 
     
    Sub Run(var)
    Set WS = CreateObject("WScript.shell")
            Select Case var
            Case 1 WS.run("calc.exe")
            Case 2 WS.run("iexplore.exe")
            Case 3 WS.run("cmd.exe")
            Case 4 WS.run("Explorer.exe ::{20d04fe0-3aea-1069-a2d8-08002b30309d}")'Poste de Travail
            Case 5 WS.run "Explorer.exe ::{645FF040-5081-101B-9F08-00AA002F954E}"'Corbeille    
            Case 6
                 MyDoc = WS.SpecialFolders("MyDocuments") & "\"  
                 WS.run "Explorer.exe /n,/e,/root,"& MyDoc
            Case 7
                 WS.run "Explorer.exe /n,/e,/root,C:\Program Files"
            Case 8
                 WS.run "CONTROL.EXE APPWIZ.CPL"  
            Case 9
                 WS.run "CONTROL.EXE"
            Case 10
                 WS.run "CONTROL.EXE DESK.CPL"
            Case 11
                 WS.run "NOTEPAD.EXE"
            Case 12
                 WS.run "Winword"          
    End select
    End Sub 
    Call PasswordForm()
     </SCRIPT>
    Merci d'avance pour votre aide

    David

  2. #2
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut

    Si vous voulez ajouter quelque chose de précis, n'hésitiez pas à le demander
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    <HTML><HEAD> 
    <TITLE></TITLE> 
    <HTA:APPLICATION 
    APPLICATIONNAME="Exemple de Menu en HTA" 
    BORDER="THIN" 
    BORDERSTYLE="NORMAL" 
    ICON="Explorer.exe" 
    INNERBORDER="NO" 
    MAXIMIZEBUTTON="NO" 
    MINIMIZEBUTTON="NO" 
    SCROLL="NO" 
    SELECTION="NO" 
    SINGLEINSTANCE="YES"/></HEAD> 
    <META HTTP-EQUIV="MSThemeCompatible" CONTENT="YES"> 
    <BODY TOPMARGIN="1" LEFTMARGIN="1"><CENTER><DIV><SPAN ID="ONSCR"></SPAN></DIV></CENTER></BODY>
     
    <SCRIPT LANGUAGE="VBScript"> 
    Dim WS : Set WS = CreateObject("wscript.shell")
    Sub window_onload()
        CenterWindow 230,130
        Call MenuPrincipal()
    End Sub
    '*****************************************************************
    Sub CenterWindow(x,y)
        window.resizeTo x, y
        iLeft = window.screen.availWidth/2 - x/2
        itop = window.screen.availHeight/2 - y/2
        window.moveTo ileft, itop
    End Sub
    '***************************************************************** 
    SUB MenuPrincipal() 
        Self.document.title = "Exemple de Menu en HTA"
        CALL InnerWindowSize(222,587) 
        ONSCR.InnerHTML="<TABLE HEIGHT=""50"" WIDTH=""220"" BORDER=""1"" BGCOLOR=""#BBBFFF"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_ 
        &"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><FONT COLOR=""#FFFFFF"" SIZE=""+2"" FACE=""VERDANA,ARIAL,HELVETICA,SANS-SERIF"">Menu Principal</FONT></CENTER></TD></TR></TABLE>"_ 
        &"<TABLE WIDTH=""220"" HEIGHT=""184"" BORDER=""1"" BGCOLOR=""#BBBFFF"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_ 
        &"<P><TR><TD><CENTER><INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Lançer la Calcuatrice"" ONCLICK=""Run(1)""><P>"_ 
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Internet Explorer"" LANGUAGE=""VBScript"" ONCLICK=Run(2)><P>"_ 
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Ligne de Commande"" LANGUAGE=""VBScript"" ONCLICK=Run(3)><P>"_ 
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Poste de Travail"" ONCLICK=""Run(4)""><P>"_ 
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Corbeille"" ONCLICK=""Run(5)""><P>"_
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Mes Documents"" ONCLICK=""Run(6)""><P>"_
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Programs Files"" ONCLICK=""Run(7)""><P>"_
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Ajouter/Supprimer APPLI"" ONCLICK=""Run(8)""><P>"_
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Panneau de configuration"" ONCLICK=""Run(9)""><P>"_
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Propriétés d'Affichage"" ONCLICK=""Run(10)""><P>"_
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Bloc Notes"" ONCLICK=""Run(11)""><P>"_
        &"<INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""WinWord"" ONCLICK=""Run(12)""><P>"_
        &"</TD></CENTER></TR></TABLE>" 
    END SUB 
    '*****************************************************************
    SUB InnerWindowSize(intWidth,intHeight) 
        Self.ResizeTo intWidth,intHeight 
        Self.ResizeTo intWidth+(intWidth-Document.Body.OffsetWidth),intHeight+(intHeight-Document.Body.OffsetHeight) 
        Self.MoveTo (Screen.Width/2)-(intWidth/2),(Screen.Height/2)-(intHeight/2) 
    END SUB 
    '*****************************************************************
    Sub Run(var)
        Set WS = CreateObject("WScript.shell")
        Select Case var
        Case 1 WS.run("calc.exe")
        Case 2 WS.run("iexplore.exe")
        Case 3 WS.run("cmd.exe")
        Case 4 WS.run("Explorer.exe ::{20d04fe0-3aea-1069-a2d8-08002b30309d}")'Poste de Travail
        Case 5 WS.run "Explorer.exe ::{645FF040-5081-101B-9F08-00AA002F954E}"'Corbeille    
        Case 6
            MyDoc = WS.SpecialFolders("MyDocuments") & "\"  
            WS.run "Explorer.exe /n,/e,/root,"& MyDoc
        Case 7
            WS.run "Explorer.exe /n,/e,/root,C:\Program Files"
        Case 8
            WS.run "CONTROL.EXE APPWIZ.CPL"  
        Case 9
            WS.run "CONTROL.EXE"
        Case 10
            WS.run "CONTROL.EXE DESK.CPL"
        Case 11
            WS.run "NOTEPAD.EXE"
        Case 12
            WS.run "Winword"          
        End select
    End Sub 
    '*****************************************************************
    </SCRIPT>

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2011
    Messages
    62
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Janvier 2011
    Messages : 62
    Points : 50
    Points
    50
    Par défaut
    Super !!!!

    Ca fonctionne parfaitement !! Merci beaucoup

    J'ai plein d'autres questions pour personnaliser cette merveille ^^

    En fait j'ai un fichier batch que j'ai créé avec plein de commandes et j'aimerais l'adapter à ce hta afin d'avoir une interface plus conviviale

    J'aimerais ajouter une commande DOS lors de l'appui sur un bouton

    Voici un exemple de commande qui sert à activer un service par exemple

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    @echo off
     
    echo.Arret du service themes >>log.txt
    sc start themes >>log.txt
     
    pause
    END

    Comment l'intégrer sur un bouton ?

    Sachant que j'ai pas mal d'autres commandes que j’intègrerais de la même facon

    Merci d'avance

    David

  4. #4
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut
    Citation Envoyé par goro_830 Voir le message
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    @echo off
    echo.Arret du service themes >>log.txt
    sc start themes >>log.txt
    pause
    END
    Comment l'intégrer sur un bouton ?
    Sachant que j'ai pas mal d'autres commandes que j’intègrerais de la même façon
    Merci d'avance
    David
    un exemple de code que j'ai posté récemment ici qui peut vous aider à créer ce que vous souhaitiez faire
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    <html>
    <head>
    <HTA:APPLICATION
    APPLICATIONNAME="Open links with IE, Chrome and Firefox and how to pass command line"
    BORDER="THIN"
    BORDERSTYLE="NORMAL"
    ICON="Explorer.exe"
    INNERBORDER="NO"
    MAXIMIZEBUTTON="NO"
    MINIMIZEBUTTON="NO"
    SCROLL="NO"
    SELECTION="NO"
    SINGLEINSTANCE="YES"/>
    <title>Open links with IE, Chrome and Firefox and how to pass command line</title>
    <SCRIPT LANGUAGE="VBScript">
    '************************************************************************************
    Option Explicit
     Function Executer(StrCmd,Console)
        Dim ws,MyCmd,Resultat
        Set ws = CreateObject("wscript.Shell")
    'La valeur 0 pour cacher la console MS-DOS
        If Console = 0 Then
            MyCmd = "CMD /C " & StrCmd & " "
            Resultat = ws.run(MyCmd,Console,True)
            If Resultat = 0 Then
                'MsgBox "Success"
            Else
                MsgBox "Une erreur inconnue est survenue !",16,"Une erreur inconnue est survenue !"
            End If
        End If
    'La valeur 1 pour montrer la console MS-DOS
        If Console = 1 Then
            MyCmd = "CMD /K " & StrCmd & " "
            Resultat = ws.run(MyCmd,Console,False)
            If Resultat = 0 Then
                'MsgBox "Success"
            Else
                MsgBox "Une erreur inconnue est survenue !",16,"Une erreur inconnue est survenue !"
            End If
        End If
        Executer = Resultat
    End Function
    '************************************************************************************
    Sub window_onload()
        CenterWindow 480,400
    End Sub
    '************************************************************************************
    Sub CenterWindow(x,y)
        Dim iLeft,itop
        window.resizeTo x,y
        iLeft = window.screen.availWidth/2 - x/2
        itop = window.screen.availHeight/2 - y/2
        window.moveTo ileft,itop
    End Sub
    '************************************************************************************
    Sub Ip_Publique()
        Dim Titre,URL,ie,objFSO,Data,OutPut,objRegex,Match,Matches,ip_public
        Titre = "Adresse Ip Publique !"
        URL = "http://monip.org"
        If OnLine("smtp.gmail.com") = True Then
            Set ie = CreateObject("InternetExplorer.Application")
            Set objFSO = CreateObject("Scripting.FileSystemObject")
            ie.Navigate (URL)
            ie.Visible=False
            DO WHILE ie.busy
                Sleep 100
            Loop
            Data = ie.document.documentElement.innertext
            Set objRegex = new RegExp
            objRegex.Pattern = "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b"
            objRegex.Global = False
            objRegex.IgnoreCase = True
            Set Matches = objRegex.Execute(Data)
            For Each Match in Matches
                MsgBox "Votre IP Publique est : "& Match.Value,64,Titre
            Next
            ie.Quit
            Set ie = Nothing
        Else
            MsgBox "Vérifier votre connexion internet puis re-executer ce script",48,Titre
            Exit Sub
        End If
    End Sub
     
    '**************************************************************************************
    Sub Sleep(MSecs)'Fonction pour faire une pause car wscript.sleep ne marche pas dans un HTA
        Dim fso,objOutputFile
        Set fso = CreateObject("Scripting.FileSystemObject")
        Dim tempFolder : Set tempFolder = fso.GetSpecialFolder(2)
        Dim tempName : tempName = "Sleeper.vbs"
        If Fso.FileExists(tempFolder&"\"&tempName)=False Then
            Set objOutputFile = fso.CreateTextFile(tempFolder&"\"&tempName, True)
            objOutputFile.Write "wscript.sleep WScript.Arguments(0)"
            objOutputFile.Close
        End If
        CreateObject("WScript.Shell").Run tempFolder&"\"&tempName &" "& MSecs,1,True
    End Sub
    '**************************************************************************************
    Sub SSID_names()
    Dim objShell,fso,File,strContents,objRegEx,objMatch,colMatches
        set objShell = CreateObject("WScript.Shell")
        Set fso = CreateObject("Scripting.FileSystemObject")
        If Executer("netsh wlan show all > Wlan.txt",0) = 0 Then
            Set File = fso.OpenTextFile("Wlan.txt",1)
            strContents = File.ReadAll
            Set objRegEx = New RegExp
            objRegEx.IgnoreCase = True
            objRegEx.Global = True
            objRegEx.Multiline = True
            objRegEx.Pattern = """([^""]+)"""
            set colMatches = objRegEx.Execute(strContents)
            For each objMatch in colMatches
                MsgBox "SSID name: " & objMatch.Value,64,"SSID name"
            Next
        End If
    End sub
    '***************************************************************************************
    Function OnLine(strHost)
    Dim objPing,z,objRetStatus,PingStatus
        Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_PingStatus where address = '" & strHost & "'")
        z = 0
        Do    
            z = z + 1
            For Each objRetStatus In objPing
                If IsNull(objRetStatus.StatusCode) Or objRetStatus.StatusCode <> 0 Then
                    PingStatus = False
                Else
                    PingStatus = True
                End If      
        Next    
            sleep 200
            If z = 4 Then Exit Do
        Loop until PingStatus = True
        If PingStatus = True Then 
            OnLine = True
        Else
            OnLine = False
        End If
    End Function
    '***************************************************************************************
    Sub WLAN_Networks()
        If Executer("netsh wlan show profiles > Wlan_tmp.txt & netsh wlan show networks >> Wlan_tmp.txt & netsh wlan show interfaces >> Wlan_tmp.txt & cmd /U /C Type Wlan_tmp.txt > Wlan_Networks.txt",0) = 0 Then
            Call Executer("Start Wlan_Networks.txt & Del Wlan_tmp.txt",0)
        End If
    End Sub
    </script>
    </head>
    <p>Links List (examples) :</p>
    <ol>
    <li><a href="#" onClick="Call Executer('Start iexplore.exe www.google.com',0)">Lien Google avec iexplore.exe</a></li>
    <li><a href="#" onClick="Call Executer('Start chrome.exe http://bbat.lesite.com/',0)">Lien BBAT avec Chrome.exe</a></li>
    <li><a href="#" onClick="Call Executer('Start Firefox.exe www.developpez.net',0)">Lien developpez.net avec Firefox.exe</a></li>
    <li><a href="#" onClick="Call Executer('Start chrome.exe www.yahoo.fr',0)">Lien Yahoo avec Chrome.exe</a></li>
    <li><a href="#" onClick="Call Executer('Start chrome.exe www.autoitscript.fr',0)">Lien Autoitscript.fr (Français) avec Chrome.exe</a></li>
    <li><a href="#" onClick="Call Executer('Start chrome.exe www.autoitscript.com',0)">Lien autoitscript.com (Anglais) avec Chrome.exe</a></li>
    <li><a href="#" onClick="Call Executer('Start www.sfr.fr',0)">Lien SFR avec votre navigateur by default</a></li>
    </ol>
    <BODY text=white bgcolor="DarkOrange" TOPMARGIN="1" LEFTMARGIN="1">
     <center><button onclick="Call Executer('mode con cols=90 lines=15 & Color 0A & Title Ping sur www.stackoverflow.com by Hackoo & Ping www.stackoverflow.com',1)">Ping on www.stackoverflow.com</button><hr>
     <center><button onclick="Call Executer('FindStr /? > HelpFindStrTmp.txt & cmd /U /C Type HelpFindStrTmp.txt > HelpFindStr.txt & start HelpFindStr.txt',0)">Help sur FindStr</button>
     <button onclick="Call Executer('ipconfig /all > configTmp.txt & cmd /U /C Type configTmp.txt > MyIPconfig.txt & Del configTmp.txt & start MyIPconfig.txt',0)">IpConfig</button>
     <button onclick="Call Executer('mode con cols=80 lines=50 & Color 9B & Title Hackoo & netstat -a',1)">Netstat</button>
     <button onclick="Call Executer('mode con cols=60 lines=10 & Color 0A & Title Hackoo & arp -a',1)">Arp</button><hr>
     <button onclick="Call Executer('mode con cols=80 lines=30 & Color 9B & Title Tracert vers www.stackoverflow.com by Hackoo & Tracert www.stackoverflow.com',1)">Tracert to  stackoverflow</button><br><hr>
     <center><button onclick="Call Ip_Publique">IP Publique</button>
     <button onclick="Call SSID_names()">SSID WLAN</button>
      <button onclick="Call WLAN_Networks()">WLAN Network</button>
     </center>
     </center>
    </body>
    </html>

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2011
    Messages
    62
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Janvier 2011
    Messages : 62
    Points : 50
    Points
    50
    Par défaut
    Merci de votre réponse

    Je prends l'exemple du bouton Ping ou tracert et c'est exactement ce que je souhaite faire avec mes boutons !

    Malheureusement je ne vois pas comment l'intégrer dans le code sans mdp que vous m'avez fait

    Dsl si je suis un peu boulet

  6. #6
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    <html>
    <head>
    <HTA:APPLICATION
    APPLICATIONNAME="How to pass command line by Hackoo"
    BORDER="THIN"
    BORDERSTYLE="NORMAL"
    ICON="Explorer.exe"
    INNERBORDER="NO"
    MAXIMIZEBUTTON="NO"
    MINIMIZEBUTTON="NO"
    SCROLL="NO"
    SELECTION="NO"
    SINGLEINSTANCE="YES"/>
    <title>How to pass command line by Hackoo</title>
    <META HTTP-EQUIV="MSThemeCompatible" CONTENT="YES">
    <SCRIPT LANGUAGE="VBScript">
    '************************************************************************************
    Option Explicit
     Function Executer(StrCmd,Console)
        Dim ws,MyCmd,Resultat
        Set ws = CreateObject("wscript.Shell")
    'La valeur 0 pour cacher la console MS-DOS
        If Console = 0 Then
            MyCmd = "CMD /C " & StrCmd & " "
            Resultat = ws.run(MyCmd,Console,True)
            If Resultat = 0 Then
                'MsgBox "Success"
            Else
                MsgBox "Une erreur inconnue est survenue !",16,"Une erreur inconnue est survenue !"
            End If
        End If
    'La valeur 1 pour montrer la console MS-DOS
        If Console = 1 Then
            MyCmd = "CMD /K " & StrCmd & " "
            Resultat = ws.run(MyCmd,Console,False)
            If Resultat = 0 Then
                'MsgBox "Success"
            Else
                MsgBox "Une erreur inconnue est survenue !",16,"Une erreur inconnue est survenue !"
            End If
        End If
        Executer = Resultat
    End Function
    '************************************************************************************
    Sub window_onload()
        CenterWindow 480,200
    End Sub
    '************************************************************************************
    Sub CenterWindow(x,y)
        Dim iLeft,itop
        window.resizeTo x,y
        iLeft = window.screen.availWidth/2 - x/2
        itop = window.screen.availHeight/2 - y/2
        window.moveTo ileft,itop
    End Sub
    '**************************************************************************************
    Sub Check_Service()
        Call Executer("echo.Etat du service themes>Tmplog.txt & sc query themes >>Tmplog.txt & findstr /c ""Etat SERVICE_NAME STATE"" Tmplog.txt >log.txt 2>nul & Del Tmplog.txt & start log.txt",0)
    End Sub
    '**************************************************************************************
    </script>
    </head>
    <BODY text=white bgcolor="DarkOrange" TOPMARGIN="1" LEFTMARGIN="1">
    <center><button onclick="Call Check_Service()">Check Service Themes</button><hr>
    <button onclick="Call Executer('mode con cols=90 lines=15 & Color 0A & Title Ping sur www.stackoverflow.com by Hackoo & Ping www.developpez.com',1)">Ping on www.developpez.com</button><hr>
     <center><button onclick="Call Executer('FindStr /? > HelpFindStrTmp.txt & cmd /U /C Type HelpFindStrTmp.txt > HelpFindStr.txt & start HelpFindStr.txt',0)">Help sur FindStr</button>
     <button onclick="Call Executer('ipconfig /all > configTmp.txt & cmd /U /C Type configTmp.txt > MyIPconfig.txt & Del configTmp.txt & start MyIPconfig.txt',0)">IpConfig</button>
     <button onclick="Call Executer('mode con cols=80 lines=50 & Color 9B & Title Hackoo & netstat -a',1)">Netstat</button>
     <button onclick="Call Executer('mode con cols=60 lines=10 & Color 0A & Title Hackoo & arp -a',1)">Arp</button><hr>
     <button onclick="Call Executer('mode con cols=80 lines=30 & Color 9B & Title Tracert vers www.stackoverflow.com by Hackoo & Tracert www.stackoverflow.com',1)">Tracert to  stackoverflow</button><br><hr>
     </center>
    </body>
    </html>

  7. #7
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2011
    Messages
    62
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Janvier 2011
    Messages : 62
    Points : 50
    Points
    50
    Par défaut
    Grace à votre aide j'avance à grands pas

    J'ai juste pour le moemtn cette erreur qui me bloque, aucun des application ne se lance et comment faire pour agrandir la fenetre afin de voir tous les boutons ? (edit c bon j'ai trouvé pour la taille de la fenêtre ) :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    '**************************************************************************************
    Sub Run(var)
    Set WS = CreateObject("WScript.shell")
            Select Case var
            Case 1 WS.run("services.msc")
    		Case 2 WS.run("Explorer.exe ::{20d04fe0-3aea-1069-a2d8-08002b30309d}")'Poste de Travail
    		Case 3 WS.run("NOTEPAD.EXE")
    		Case 4 WS.run("CONTROL.EXE")
    End select
    End Sub
    '**************************************************************************************
     
     
    </script>
    </head>
    <center>
    <BODY text=white bgcolor="Blue" TOPMARGIN="1" LEFTMARGIN="1">
     <button onclick="Call Check_Services()">Check Services</button>
     <button onclick="Call Stop_Services()">Stop Services</button>
     <button onclick="Call Start_Services()">Start Services</button>
     <button onclick=""Run(1)"">Services</button><hr>
     <button onclick="Call Executer('mode con cols=90 lines=15 & Color 0A & Title Ping sur www.stackoverflow.com by Hackoo & Ping www.developpez.com',1)">Copie des fi</button><hr>
     <center><button onclick="Call Executer('FindStr /? > HelpFindStrTmp.txt & cmd /U /C Type HelpFindStrTmp.txt > HelpFindStr.txt & start HelpFindStr.txt',0)">Help sur FindStr</button>
     <button onclick="Call Executer('ipconfig /all > configTmp.txt & cmd /U /C Type configTmp.txt > MyIPconfig.txt & Del configTmp.txt & start MyIPconfig.txt',0)">IpConfig</button>
     <button onclick="Call Executer('mode con cols=80 lines=50 & Color 9B & Title Hackoo & netstat -a',1)">Netstat</button>
     <button onclick="Call Executer('mode con cols=60 lines=10 & Color 0A & Title Hackoo & arp -a',1)">Arp</button><hr>
     <button onclick=""Run(2)"">Poste de travail</button><br>
     <button onclick=""Run(3)"">Notepad</button><br>
     <button onclick=""Run(4)"">Panneau de config</button><br><hr>
     </center>
    </body>
    </html>
    Merci d'avance

  8. #8
    Expert éminent sénior
    Avatar de ProgElecT
    Homme Profil pro
    Retraité
    Inscrit en
    Décembre 2004
    Messages
    6 078
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 68
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Retraité
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2004
    Messages : 6 078
    Points : 17 075
    Points
    17 075
    Par défaut
    Salut

    Si tu veux utiliser le code proposé par hackoofr , il te manque la fonction Function Executer(StrCmd,Console) , a moins que tu n'ai pas remis le code complet de ton HTA.
    pourquoi pas, pour remercier, un pour celui/ceux qui vous ont dépannés.
    saut de ligne
    OOOOOOOOO👉 → → Ma page perso sur DVP ← ← 👈

  9. #9
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2011
    Messages
    62
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Janvier 2011
    Messages : 62
    Points : 50
    Points
    50
    Par défaut
    CC

    La fonction est bien présente, je n'ai mis qu'une partie du code, celle qui me semblait en faute

    Je poste l'intégralité au besoin

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    <html>
    <head>
    <HTA:APPLICATION
    APPLICATIONNAME="How to pass command line by Hackoo"
    BORDER="THIN"
    BORDERSTYLE="NORMAL"
    ICON="Explorer.exe"
    INNERBORDER="NO"
    MAXIMIZEBUTTON="NO"
    MINIMIZEBUTTON="NO"
    SCROLL="NO"
    SELECTION="NO"
    SINGLEINSTANCE="YES"/>
    <title>Boite a outils !! </title>
    <META HTTP-EQUIV="MSThemeCompatible" CONTENT="YES">
    <SCRIPT LANGUAGE="VBScript">
    '************************************************************************************
    Option Explicit
     Function Executer(StrCmd,Console)
        Dim ws,MyCmd,Resultat
        Set ws = CreateObject("wscript.Shell")
    'La valeur 0 pour cacher la console MS-DOS
        If Console = 0 Then
            MyCmd = "CMD /C " & StrCmd & " "
            Resultat = ws.run(MyCmd,Console,True)
            If Resultat = 0 Then
                'MsgBox "Success"
            Else
                MsgBox "Une erreur inconnue est survenue !",16,"Une erreur inconnue est survenue !"
            End If
        End If
    'La valeur 1 pour montrer la console MS-DOS
        If Console = 1 Then
            MyCmd = "CMD /K " & StrCmd & " "
            Resultat = ws.run(MyCmd,Console,False)
            If Resultat = 0 Then
                'MsgBox "Success"
            Else
                MsgBox "Une erreur inconnue est survenue !",16,"Une erreur inconnue est survenue !"
            End If
        End If
        Executer = Resultat
    End Function
    '************************************************************************************
    Sub window_onload()
        CenterWindow 480,480
    End Sub
    '************************************************************************************
    Sub CenterWindow(x,y)
        Dim iLeft,itop
        window.resizeTo x,y
        iLeft = window.screen.availWidth/2 - x/2
        itop = window.screen.availHeight/2 - y/2
        window.moveTo ileft,itop
    End Sub
    '**************************************************************************************
    Sub Check_Services()
        Call Executer("echo.Etat du service themes & sc query themes >>Tmplog.txt",0)
    	Call Executer("echo.Etat du service TeamViewer & sc query TeamViewer >>Tmplog.txt",0)
    	Call Executer("echo.Etat du service webclient & sc query webclient >>Tmplog.txt & findstr /c ""Etat SERVICE_NAME STATE echo."" Tmplog.txt >>log.txt 2>nul & Del Tmplog.txt & start log.txt",0)
    End Sub
    '**************************************************************************************
    Sub Start_Services()
        Call Executer("echo.Demarrage du service themes & sc config themes start= auto >>Tmplog.txt",0)
    	Call Executer("echo.Demarrage du service TeamViewer & sc config TeamViewer start= auto >>Tmplog.txt",0)
    	Call Executer("echo.Demarrage du service webclient & sc config webclient start= auto >>Tmplog.txt",0)
    	Call Executer("echo.Activation du service themes & sc start themes >>Tmplog.txt",0)
    	Call Executer("echo.Activation du service TeamViewer & sc start TeamViewer >>Tmplog.txt",0)
    	Call Executer("echo.Activation du service webclient & sc start webclient >>Tmplog.txt",0)
    End Sub
    '**************************************************************************************
    Sub Stop_Services()
        Call Executer("echo.Arret du service themes & sc stop themes >>Tmplog.txt",0)
    	Call Executer("echo.Arret du service TeamViewer & sc stop TeamViewer >>Tmplog.txt",0)
    	Call Executer("echo.Arret du service webclient & sc stop webclient >>Tmplog.txt",0)
    	Call Executer("echo.Desactivation du service themes & sc config themes start= disabled >>Tmplog.txt",0)
    	Call Executer("echo.Desactivation du service TeamViewer & sc config TeamViewer start= disabled >>Tmplog.txt",0)
    	Call Executer("echo.Desactivation du service webclient & sc config webclient start= disabled >>Tmplog.txt",0)
    End Sub
    '**************************************************************************************
    Sub Start_iMQ()
        Call Executer("echo.Arret du service themes & sc themes iMQ >>Tmplog.txt",0)
    End Sub
    '**************************************************************************************
    Sub Stop_iMQ()
        Call Executer("echo.Arret du service themes & sc stop themes >>Tmplog.txt",0)
    End Sub
    '**************************************************************************************
    Sub Run(var)
    Set WS = CreateObject("WScript.shell")
            Select Case var
            Case 1 WS.run("services.msc")
    		Case 2 WS.run("Taskschd.msc")
    		Case 3 WS.run("NOTEPAD.EXE")
    		Case 4 WS.run("CONTROL.EXE")
    End select
    End Sub
    '**************************************************************************************
    Sub Tache_Check()
       	Call Executer("echo.Etat AutorebootAxis & schtasks /query /TN test >>log.txt & start log.txt",0)
    End Sub
    '**************************************************************************************
    Sub Tache_ON()
       	Call Executer("echo.Activation AutorebootAxis & schtasks /change /TN test /enable >>log.txt",0)
    End Sub
    '**************************************************************************************
    Sub Tache_OFF()
       	Call Executer("echo.Desactivation AutorebootAxis & schtasks /change /TN test /disable >>log.txt",0)
    End Sub
    '**************************************************************************************
    Sub Tache_RUN()
       	Call Executer("echo.Execution AutorebootAxis & schtasks /run /TN test >>log.txt",0)
    End Sub
    '**************************************************************************************
    Sub Copie_Temp()
       	Call Executer("echo.Creation migration_H%TARS% & md c:\temp\migration_H%TARS% >>log.txt",0)
    	Call Executer("echo.Export cle **** & reg export HKLM\SOFTWARE\... c:\temp\migration_H%TARS%\***.txt >>log.txt",1)
    	Call Executer("echo.Export cle **** & reg export HKLM\SOFTWARE\... c:\temp\migration_H%TARS%\***.txt >>log.txt",1)
    	Call Executer("echo.Export BDD **** & xcopy c:*****.mdb /e /s c:\temp\migration_H%TARS%\ >>log.txt",1)
    End Sub
    '**************************************************************************************
    Sub Copie_Axis()
       	Call Executer("echo.Export ****.zip c:\fols\T****.zip c:\temp\migration_H%TARS% /E /S >>log.txt",0)
    	Call Executer("echo.Export ******.txt & xcopy c:\fols\*****.txt c:\temp\migration_H%TARS% /E /S >>log.txt",0)
    	Call Executer("echo.Export Edit & xcopy C:*****.* /e /s c:\temp\migration_H%TARS%\Edit\ >>log.txt",1)
    	Call Executer("echo.Export Orig & xcopy C:\*****.* /e /s c:\temp\migration_H%TARS%\Orig\ >>log.txt",1)
    	Call Executer("echo.Export Maxstore & xcopy C:\**** c:\temp\migration_H%TARS% /E /S >>log.txt",1)
    End Sub
    '**************************************************************************************
    Sub Copie_USB()
       	Call Executer("echo.Export sur cle USB.zip & xcopy c:\temp\migration_H%TARS% %LETTRE%:\migration_H%TARS%\ /E /S >>log.txt",0)
    End Sub
    '**************************************************************************************
     
    </script>
    </head>
    <center>
    <BODY text=white bgcolor="Magenta" TOPMARGIN="1" LEFTMARGIN="1">
    '**************************************************************************************
     <button onclick="Call Check_Services()">Check Services</button>
     <button onclick="Call Stop_Services()">Stop Services</button>
     <button onclick="Call Start_Services()">Start Services</button>
     <button onclick="Call Stop_iMQ()">Stop ***</button>
     <button onclick="Call Start_iMQ()">Start ***</button>
     <button onclick=""Run(1)"">Gestionnaire de Services</button>
     '**************************************************************************************
     <button onclick="Call Tache_Check()">Check Tache</button>
     <button onclick="Call Tache_OFF()">Stop Tache</button>
     <button onclick="Call Tache_ON()">Start Tache</button>
     <button onclick="Call Tache_RUN()">Run Tache</button>
     <button onclick=""Run(2)"">Planificateur de Taches</button>
     '**************************************************************************************
     <button onclick="Call Copie_Temp()">Creation dossier migration</button>
     <button onclick="Call Copie_Axis()">Copie fichiers paiement</button>
     <button onclick="Call Copie_USB()">Copie sur cle USB</button> 
     '**************************************************************************************
     <button onclick="Call Executer('FindStr /? > HelpFindStrTmp.txt & cmd /U /C Type HelpFindStrTmp.txt > HelpFindStr.txt & start HelpFindStr.txt',0)">Help sur FindStr</button>
     <button onclick="Call Executer('ipconfig /all > configTmp.txt & cmd /U /C Type configTmp.txt > MyIPconfig.txt & Del configTmp.txt & start MyIPconfig.txt',0)">IpConfig</button>
     '**************************************************************************************
     <button onclick="Call Executer('mode con cols=80 lines=50 & Color 9B & Title Hackoo & netstat -a',1)">Netstat</button>
     <button onclick="Call Executer('mode con cols=60 lines=10 & Color 0A & Title Hackoo & arp -a',1)">Arp</button>
     '**************************************************************************************
     <button onclick=""Run(2)"">Poste de travail</button><br>
     <button onclick=""Run(3)"">Notepad</button><br>
     <button onclick=""Run(4)"">Panneau de config</button><br>
     '**************************************************************************************
     </center>
    </body>
    </html>
    Merci de nous avoir rejoints

  10. #10
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2011
    Messages
    62
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Janvier 2011
    Messages : 62
    Points : 50
    Points
    50
    Par défaut
    Voila, j'ai résolu aussi mon plb d'applis qui ne se lancent pas

    A présent, un autre soucis me bloque, je souhaiterais récupérer des clés d'activation en base de registre, la seule info que me renvoit la commande c'est test 2 lol

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    Sub Lire_BDR()
    	Dim WSHShell  
        Set WSHShell = CreateObject("WScript.Shell")
        WSHShell.popup	WSHShell.regread("HKLM\SOFTWARE\*****")    
    End Sub
    Ou est mon erreur svp ??

  11. #11
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2011
    Messages
    62
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France

    Informations forums :
    Inscription : Janvier 2011
    Messages : 62
    Points : 50
    Points
    50
    Par défaut
    Bon j'ai feinté en passant par un commande DOS et ca fonctionne

    Je clos ! Merci à vous

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Exemple de Menu en HTA avec Password et Limite de nombre d'essais
    Par hackoofr dans le forum Vos Contributions VBScript
    Réponses: 0
    Dernier message: 10/09/2012, 23h34
  2. [VB.Net] [login] probleme avec password recovery
    Par graphicsxp dans le forum ASP.NET
    Réponses: 5
    Dernier message: 17/02/2006, 14h53
  3. Integration de menu HTML/CSS avec PHP
    Par sparrow dans le forum Langage
    Réponses: 7
    Dernier message: 31/01/2006, 02h50
  4. Exemple d'utilisation de SOAP avec C++
    Par jlassira dans le forum Bibliothèques
    Réponses: 5
    Dernier message: 04/01/2006, 08h42
  5. [Boite de dialogue] avec password
    Par vasilov dans le forum Composants
    Réponses: 6
    Dernier message: 10/08/2005, 14h34

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo