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 :

Convertir un script BATCH en VB


Sujet :

VBScript

  1. #1
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut Convertir un script BATCH en VB
    Salut tout le monde,

    J'ai souvent des nettoyage de PC a faire sur des postes client au boulot qui ont tous le même master et arborescence de fichiers.

    Souvent, le disque C: qui n'a qu'une partition de 50Go se retrouve saturé.

    Au vu du nombre de probleme et du temps passé a faire un nettoyage manuel, j'ai donc crée un script en BATCH (seul langage que je connais !) pour automatiser toutes les actions que l'on effectuais manuellement auparavent

    Gain de temps considérable, la seule variable est le nom d'utilisateur a rentrer, car les utilisateurs ne sont pas administrateur, donc obligé de lancer le script en tant qu'administateur, ce qui induit que la variable %userprofile% ne peut pas être utilisé car le script travaillerait dans le profil du technicien qui le lance.

    Voila pour l'explication.

    Maintenant ce que je souhaiterais c'est améliorer ce script avec une interface graphique, qui me permettrait d'avoir une boite, avec des cases a cocher sur ce que je souhaite supprimer, et une barre de progression... ce que ne permet pas le batch, à moins de se compliquer la vie.

    c'est pour cela que je me tourne vers vous; pro du VB !

    Après pas mal de recherche j'ai du mal a trouver les correspondances, et du mal tout court a me faire au VB.

    J'en appelle a votre charité et à vos connaissances pour m'aider a crée donc un script qui correspond a mes critères grace a ce model : (je l'ai epuré un peu, il y a quand meme des graphismes, mais c'est pour que ce soit plus clair)

    Merci d'avance !

    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
    REM Affichage du nom d'utilisateur
    dir c:\users | Findstr "%date%" 
     
    REM Selection du nom d'utilisateur
    echo Nom d'utilisateur :
    set /p utilisateur=
     
    REM Fermeture de tous les programmes
    taskkill /f /im iexplore.exe
    taskkill /f /im outlook.exe
    taskkill /f /im winword.exe
    taskkill /f /im excel.exe
    taskkill /f /im searchindexer.exe
    taskkill /f /im searchprotocolhost.exe
     
    REM Suppression veille prolongée
    powercfg -h off
     
    REM Vidage MSOCACHE
    del /s /q C:\MSOCACHE\*.*
     
    REM Vidage C:\TEMP 
    del /s /q  c:\temp\*.* 
     
    REM Nettoyage disque Windows en mode silencieux
    cleanmgr /sagerun
     
    REM Vidage C:\users\*.tmp et C:\windows\*.tmp
    del /s /q c:\users\*.tmp 
    del /s /q c:\windows\*.tmp 
     
    REM Nettoyage IE
    RunDll32.exe inetcpl.cpl, ClearMyTracksByProcess 8
    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
     
    REM Suppression des points de restauration Windows sur C: et taille maxi 500Mo
    vssadmin delete shadows /all /quiet
    vssadmin resize shadowstorage /For=c: /On=c: /MaxSize=500MB
     
    REM Vidage des fichier Dump
    del /s /q "c:\windows\*.dmp"
     
    REM Vidage des fichiers log
    del /s /q "c:\windows\temp\*.log" 
     
    REM Vidage des sauvegarde de fichiers OST outlook
    del /s /q "C:\users\%utilisateur%\appdata\local\microsoft\outlook\*.old" 
    del /s /q "C:\users\%utilisateur%\appdata\local\microsoft\outlook\*.bak" 
     
    REM Lancement powershell script deplacement pagefile sur D:
    powershell \\bcnvdat007\refbin\dos\pagefiled.ps1
     
    REM Fin du script
    pause > nul

  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

    La question sur la manière de donner une interface au script VBS revient souvent sur le forum ..
    Le HTA (Html Application) est l'une des solutions.
    Cet article va vous aider à débuter avec le hta

    Voici le lien de l'article : Donner une interface à vos script VBS , HTA : Html Application



  3. #3
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut
    Salut,

    Merci de ta réponse intéressante ! D'accord pour l'interface graphique.

    Ce que j'aimerai savoir maintenant, c'est "convertir" les commande du Batch ou VB et j'ai du mal à trouver tout ça malheuresement, je fais des recherche pourtant...

    Merci

  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

    Voici un petit coup de pousse de départ et c'est à vous maintenant de terminer le reste
    Bonne Chance à vous et n'oubliez pas de partager votre travail à la fin
    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
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    <Html>
    <Head>
    <Title>PC Information + Process Killer © Hackoo Crackoo © 2013</Title>
    <HTA:Application
    Caption = Yes
    Icon = "Explorer.exe"
    Border = Thick
    ShowInTaskBar = Yes
    SingleInstance = Yes
    MaximizeButton = Yes
    MinimizeButton = Yes>
    <META HTTP-EQUIV="MSThemeCompatible" CONTENT="YES">
    <script Language = VBScript>
    Option Explicit
    Dim fso,Titre,LogFile
    Titre = "PC Information + Process Killer© Hackoo Crackoo © 2013"
    Set fso = CreateObject("Scripting.FileSystemObject")
    LogFile = "ProcessKilled.txt"
    If fso.FileExists(LogFile) Then fso.DeleteFile LogFile
    '**********************************************************************************************
    Sub Window_OnLoad
    	Dim intWidth,intHeight,strIPInfo,arrIPInfo
    	intWidth = 800
    	intHeight = 600
    	Me.ResizeTo intWidth, intHeight
    	Me.MoveTo ((Screen.Width / 2) - (intWidth / 2)),((Screen.Height / 2) - (intHeight / 2))
    	span_computername.innerHTML = GetComputerName()
    	span_username.innerHTML = GetUserName()
    	strIPInfo = GetIPInformation()
    	If InStr(strIPInfo, ";") > 0 Then
    		arrIPInfo = Split(strIPInfo, ";")
    		If UBound(arrIPInfo) >= 3 Then
    			span_ipaddress.InnerHTML = arrIPInfo(0)
    			span_subnetmask.InnerHTML = arrIPInfo(1)
    			span_defaultgateway.InnerHTML = arrIPInfo(2)
    			span_primarydns.InnerHTML = arrIPInfo(3)
    			If UBound(arrIPInfo) = 4 Then
    				span_secondarydns.InnerHTML = arrIPInfo(4)
    			End If
    		End If
    	End If
    	GenererCheckBox()
    End Sub
    '**********************************************************************************************
    Function GetComputerName()
    	Dim objNetwork
    	Set objNetwork = CreateObject("WScript.Network")
    	GetComputerName = objNetwork.ComputerName
    End Function
    '**********************************************************************************************
    Function GetUserName()
    	Dim objNetwork
    	Set objNetwork = CreateObject("WScript.Network")
    	GetUserName = objNetwork.UserName
    End Function
    '**********************************************************************************************
    Function GetIPInformation()
    	Dim strComputer,objWMIService,colNetAdapters,strDetails,objAdapter
    	strComputer = "."
    	Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    	Set colNetAdapters = objWMIService.ExecQuery _
    	("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=True")
    	strDetails = ""
    	For Each objAdapter In colNetAdapters
    		If IsNull(objAdapter.IPAddress) = False And IsNull(objAdapter.DefaultIPGateway) = False Then
    			If Join(objAdapter.IPAddress) <> "0.0.0.0" Then
    				If strDetails = "" Then
    					strDetails = Join(objAdapter.IPAddress) & ";"
    					strDetails = strDetails & Join(objAdapter.IPSubnet) & ";"
    					strDetails = strDetails & Join(objAdapter.DefaultIPGateway) & ";"
    					strDetails = strDetails & Join(objAdapter.DNSServerSearchOrder, ";")
    				End If
    			End If
    		End If
    	Next
    	GetIPInformation = strDetails
    End Function
    '**********************************************************************************************
    Sub SelectAll()
    	Dim checkbox
    	For Each checkbox In CheckboxOption
    		checkbox.Checked = True 
    	Next
    End Sub
    '**********************************************************************************************
    Sub UnSelectAll()
    	Dim checkbox 
    	For Each checkbox In CheckboxOption
    		checkbox.Checked = False 
    	Next
    End Sub
    '**********************************************************************************************
    Sub KillThis()
    	Dim LogFile,ws,fso,checkbox
    	LogFile = "ProcessKilled.txt"
    	Set Ws  = CreateObject("Wscript.Shell")
    	Set FSO = CreateObject("Scripting.FileSystemObject")
    	For Each checkbox In CheckboxOption
    		If checkbox.Checked = True Then 
    			Kill(checkbox.Value)
    		End If
    	Next
    	If FSO.FileExists(LogFile) Then
    		MsgBox Formater(LogFile),64,Titre
    		ws.run LogFile,1,True
    	End If
    End Sub
    '**********************************************************************************************
    Sub Kill(Process)
    	Dim FSO,Ws,MyDate,Command,Execution,LogFile
    	Set FSO = CreateObject("Scripting.FileSystemObject")
    	Set Ws  = CreateObject("Wscript.Shell")
    	LogFile = "ProcessKilled.txt"
    	MyDate = "cmd /c echo %date% ^@ %time%  >> "&LogFile&""
    	Command = "cmd /c Taskkill /F /IM "&Process&" >> "&LogFile&""
    	Execution = Ws.Run(MyDate,0,True)
    	Execution = Ws.Run(Command,0,True)
    End Sub
    '**********************************************************************************************
    'Fonction pour formater et remplacer les caractères spéciaux unicode dans le LogFile
    Function Formater(LogFile)
    	Dim fso,fRead,fWrite,Text
    	Set fso = CreateObject("Scripting.FileSystemObject")
    	Set fRead = fso.OpenTextFile(LogFile,1)
    	Text = fRead.ReadAll
    	fRead.Close
    	Set fWrite = fso.OpenTextFile(LogFile,2,True)
    	Text = Replace(Text,"‚","é")
    	Text = Replace(Text,"ÿ"," ")
    	Text = Replace(Text,"ˆ","ê")
    	Text = Replace(Text,"‡","ç")
    	Text = Replace(Text,"“","ô")
    	Text = Replace(Text,"…","à")
    	Text = Replace(Text,"Š","è")
    	Text = Replace(Text,"ƒ","â")
    	Text = Replace(Text,"?"," ")
    	fWrite.WriteLine Text
    	Formater = Text
    End Function
    '**********************************************************************************************
    'Fonction pour ajouter les doubles quotes dans une variable
    Function DblQuote(strIn)
    	DblQuote = Chr(34) & strIn & Chr(34)
    End Function
    '**********************************************************************************************
    Sub GenererCheckBox()
    	Const ForReading = 1
    	Dim StrHTML,objFSO,strNewFile,ListProcess,objFile,LireTout,MyTab,i
    	Set objFSO = CreateObject("Scripting.FileSystemObject")
    	StrHTML = "<h2><b><font color='red'>Processus à Arrêter</font></b></h2>"
    	strNewFile = "Process2Kill.txt"
    	If Not objFSO.FileExists(strNewFile) Then
    			ListProcess = "iexplore.exe" & vbCrLf & "FireFox.exe" & vbCrLf & "Chrome.exe" & vbCrLf &_
    			"outlook.exe" & vbCrLf & "winword.exe" & vbCrLf & "excel.exe" & vbCrLf & "searchindexer.exe" & vbCrLF & "searchprotocolhost.exe"
    			Call WriteProcessFile(ListProcess,strNewFile)
    	End If
    	Set objFile = objFSO.OpenTextFile(strNewFile,ForReading)
    	LireTout = objFile.ReadAll
    	MyTab = Split(LireTout,vbCrLf)
    	For i = LBound(MyTab) To UBound(MyTab)
    		StrHTML = StrHTML & MySpanCheckBox.InnerHTML &_
    		"<br><input type='checkbox' name='CheckboxOption' value=" & MyTab(i) & " title = " & MyTab(i) & " Checked = 'True'>" & MyTab(i)
    	Next
    	MySpanCheckBox.InnerHTML = StrHTML
    End Sub
    '**********************************************************************************************
    'Fonction pour écrire les processus par défaut dans un fichier texte
    Sub WriteProcessFile(strText,File)
    	Dim fs,ts 
    	Const ForWriting = 2
    	Set fs = CreateObject("Scripting.FileSystemObject")
    	Set ts = fs.OpenTextFile(File,ForWriting,True)
    	ts.Write strText
    	ts.Close
    End Sub
    '**********************************************************************************************
    </script>
    <body text="white" style="background-color:DarkOrange">
    <table width= "90%" border="0" align="center">
    <tr>
    <td align="center" colspan="2">
    <h2>PC INFORMATION</h2><br>
    </td>
    </tr>
    <tr>
    <td>
    Le Nom de l'ordinateur est : 
    </td>
    <td>
    <span id="span_computername"></span>
    </td>
    </tr>
    <tr>
    <td>
    Vous êtes connecté en tant que :
    </td>
    <td>
    <span id="span_username"></span>
    </td>
    </tr>
    <tr>
    <td>
    Adresse IP est : 
    </td>
    <td>
    <span id="span_ipaddress"></span>
    </td>
    </tr>
    <tr>
    <td>
    Le masque de sous-réseau est :
    </td>
    <td>
    <span id="span_subnetmask"></span>
    </td>
    </tr>
    <tr>
    <td>
    Passarelle par défaut est :
    </td>
    <td>
    <span id="span_defaultgateway"></span>
    </td>
    </tr>
    <tr>
    <td>
    Serveur DNS Primaire  est :
    </td>
    <td>
    <span id="span_primarydns"></span>
    </td>
    </tr>
    <tr>
    <td>
    Serveur DNS Secondaire  est :
    </td>
    <td>
    <span id="span_secondarydns"></span>
    </td>
    </tr>
    </table>
    </body>
    <center><input type="button" name="SelectAll" id="SelectAll" value="Tout sélectionner" onclick="SelectAll">
    <input type="button" name="UnSelectAll" id="UnSelectAll" value="Tout désélectionner" onclick="UnSelectAll">
    <input type="button" name="KillThis" id="KillThis" value="Arrêter le(s) Processus" onclick="KillThis()">
    <table>
    <tr>
    <td>
    <span id="MySpanCheckBox"></span>
    </td>
    </tr>
    </table>
    </html>

  5. #5
    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

    Voici un Script qui vous montre comment utiliser la ligne de commande du DOS dans un Vbscript. Ici on utilise les commandes Ping et Tracert avec la fonction RunDos(StrCommand,Argum) avec une Barre d'attente ("Waiting Bar").
    L'idée vient que, si on lance une commande qui nécessite un long processus visant à atteindre et que vous ne connaissez pas la durée de son exécution.
    C'est le cas de la commande Tracert, alors on lance une barre d'attente pour avertir l'utilisateur qu'il y a un processus en cours d’exécution et il faut attendre un peu pour finir.
    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
    '*********************************Déclaration des variables globales*******************************
    Option Explicit
    Dim oExec,fso,ws,Temp,Voice,Argum
    Dim Command,Command2,Res,LogFile,startlog,MsgTitre,Titre,MsgAttente,StartTime,DurationTime,TitreInputBox
    Set ws = CreateObject("wscript.Shell")
    Set fso = CreateObject("Scripting.FileSystemObject") 
    Temp = ws.ExpandEnvironmentStrings("%Temp%")
    Set Voice = CreateObject("SAPI.SpVoice")
    '**************************************************************************************************
    'Appel au programme principal ou on peut intégrer la barre de progression
    TitreInputBox = "Ping et Tracert vers une URL © Hackoo © 2013"
    'Call RunDos("Dir","%tmp%")
    Argum = InputBox("Taper l'adresse d'une URL pour déterminer sa réponse avec la commande DOS "& DblQuote("Ping"),TitreInputBox,"www.developpez.com")
    Call RunDos("Ping.exe",Argum & " -l 200")'ici on utilise l'argument -l 200 pour changer le nombre d'octets à envoyer à 200 par exemple
    Call RunDos("Tracert",Argum)
    '**************************************************************************************************
    Sub RunDos(StrCommand,Argum)
        MsgTitre = StrCommand & " vers "& DblQuote(Argum) &" © Hackoo © 2013"
        LogFile = StrCommand & "Log.txt"
        If fso.FileExists(LogFile) Then fso.DeleteFile LogFile
        Command = "Cmd /c "& StrCommand & " " & Argum &" >> "&LogFile&""
        Titre = StrCommand & " vers "& DblQuote(Argum) &" est en cours ..."
        MsgAttente = "Veuillez patientez !"
        Call CreateProgressBar(Titre,MsgAttente)'Creation de barre de progression
        Voice.Speak "Please Wait a While !"
        Call LancerProgressBar()'Lancement de la barre de progression
        StartTime = Timer'Début du Compteur Timer
        Res = Ws.Run(Command,0,True)'Exécution de la Commande
        DurationTime = FormatNumber(Timer - StartTime, 0) & " seconds."'La durée de l'exécution du script
        Call Formater(LogFile)'Pour formater et remplacer les caractères spéciaux unicode dans le LogFile
        Call FermerProgressBar()'Fermeture de barre de progression
        Voice.Speak "Process of Ping finished in "& DurationTime &" !"
        ws.popup "Le Ping vers "& DblQuote(Argum) &" est terminée dans "& vbcr & DurationTime,"5",MsgTitre,64
        ws.popup Formater(LogFile),"5",MsgTitre,64
        Command2 = "Cmd /c Start "&LogFile&""
        startlog = Ws.Run(Command2,0,False)
    End Sub
    '****************************************************************************************************
    Sub CreateProgressBar(Titre,MsgAttente)
        Dim ws,fso,f,f2,ts,ts2,Ligne,i,fread,LireTout,NbLigneTotal,Temp,PathOutPutHTML,fhta,oExec
        Set ws = CreateObject("wscript.Shell")
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set f = fso.GetFile(WScript.ScriptFullName)
        Set ts = f.OpenAsTextStream(1,-2)
        Set fread = Fso.OpenTextFile(f,1)
        LireTout = fread.ReadAll
        NbLigneTotal = fread.Line 
        Temp = WS.ExpandEnvironmentStrings("%Temp%")
        PathOutPutHTML = Temp & "\Barre.hta"
        Set fhta = fso.OpenTextFile(PathOutPutHTML,2,True)
        fso.CreateTextFile Temp & "\loader.gif"
        Set f2 = fso.GetFile(Temp & "\loader.gif")
        Set ts2 = f2.OpenAsTextStream(2,-2)
        for i=1 to NbLigneTotal - 1
            ts.skipline
        Next
        Do
            Ligne = ts.readline
            For i=2 to Len(Ligne) step 2
                ts2.write chr( "&h" & mid(Ligne,i,2))
            Next
        loop until ts.AtEndOfStream
        ts.Close
        ts2.Close
        fhta.WriteLine "<HTML>"
        fhta.WriteLine "<HEAD>" 
        fhta.WriteLine "<Title>" & Titre & "</Title>" 
        fhta.WriteLine "<HTA:APPLICATION"
        fhta.WriteLine "ICON = ""Cmd.exe"" "
        fhta.WriteLine "BORDER=""THIN"" "
        fhta.WriteLine "INNERBORDER=""NO"" "
        fhta.WriteLine "MAXIMIZEBUTTON=""NO"" "
        fhta.WriteLine "MINIMIZEBUTTON=""NO"" "
        fhta.WriteLine "SCROLL=""NO"" "
        fhta.WriteLine "SYSMENU=""NO"" "
        fhta.WriteLine "SELECTION=""NO"" " 
        fhta.WriteLine "SINGLEINSTANCE=""YES"">"
        fhta.WriteLine "</HEAD>" 
        fhta.WriteLine "<BODY text=""white""><CENTER><DIV><SPAN ID=""ProgressBar""></SPAN>"
        fhta.WriteLine "<span><marquee DIRECTION=""LEFT"" SCROLLAMOUNT=""3"" BEHAVIOR=ALTERNATE><font face=""Comic sans MS"">" & MsgAttente &" "& Titre & "</font></marquee></span></DIV></CENTER></BODY></HTML>"
        fhta.WriteLine "<SCRIPT LANGUAGE=""VBScript""> "
        fhta.WriteLine "Set ws = CreateObject(""wscript.Shell"")"
        fhta.WriteLine "Temp = WS.ExpandEnvironmentStrings(""%Temp%"")"
        fhta.WriteLine "Sub window_onload()"
        fhta.WriteLine "    CenterWindow 380,90"
        fhta.WriteLine "    Self.document.bgColor = ""Orange"" "
        fhta.WriteLine "    image = ""<center><img src= "& Temp & "\loader.gif></center>"" "
        fhta.WriteLine "    ProgressBar.InnerHTML = image"
        fhta.WriteLine " End Sub"
        fhta.WriteLine " Sub CenterWindow(x,y)"
        fhta.WriteLine "    Dim iLeft,itop"
        fhta.WriteLine "    window.resizeTo x,y"
        fhta.WriteLine "    iLeft = window.screen.availWidth/2 - x/2"
        fhta.WriteLine "    itop = window.screen.availHeight/2 - y/2"
        fhta.WriteLine "    window.moveTo ileft,itop"
        fhta.WriteLine "End Sub"
        fhta.WriteLine "</script>"
    End Sub
    '**********************************************************************************************
    Sub LancerProgressBar()
        Set oExec = Ws.Exec("mshta.exe " & Temp & "\Barre.hta")
    End Sub
    '**********************************************************************************************
    Sub FermerProgressBar()
        oExec.Terminate
    End Sub
    '**********************************************************************************************
    'Fonction pour ajouter les doubles quotes dans une variable
    Function DblQuote(Str)
        DblQuote = Chr(34) & Str & Chr(34)
    End Function
    '**********************************************************************************************
    'Fonction pour formater et remplacer les caractères spéciaux unicode dans le LogFile
    Function Formater(File)
        Dim fso,fRead,fWrite,Text
        Set fso = CreateObject("Scripting.FileSystemObject")
        Set fRead = fso.OpenTextFile(File,1)
        Text = fRead.ReadAll
        fRead.Close
        Set fWrite = fso.OpenTextFile(File,2,True)
        Text = Replace(Text,"‚","é")
        Text = Replace(Text,"ÿ"," ")
        Text = Replace(Text,"ˆ","ê")
        Text = Replace(Text,"‡","ç")
        Text = Replace(Text,"“","ô")
        Text = Replace(Text,"…","à")
        Text = Replace(Text,"Š","è")
        Text = Replace(Text,"ƒ","â")
        Text = Replace(Text,"?"," ")
        fWrite.WriteLine Text
        Formater = Text
    End Function
    '************************************************************************************************
    '47494638396180000F00F20000F3D9DDF15279F2BBC6F2B0BEF17492F1527900000000000021FF0B4E45545343415045322E30030100000021FE1A43726561746564207769746820616A61786C6F61642E696E666F0021F904090A0000002C0000000080000F000003E708B20BFEAC3D17C5A4F1AA7CABF61D3781A3089918B391AB5949A9FB96EC6B9DF58CCBB9DDF340D54E1823B68C365A107664FA744527B4798B56A94AE4343994FE9E57AE35EB5D86B7E86F590B5EBBCF6AB8992C67CFBB3EBA1EBF1FF3FF7E81587862838285886977878A760C039091031392919495930F98990E9B97959F92A1969A98A390A79C009B9EA5A0AEA2B0A49DA6B2A8B6AAADB4AFBBB1BDB3ABACBCC1C3BAC4BEC7C0C6CBB5BFB7CEB9CDC9C2A9D5B8D6D0D8D3D1C5D2CCC2CADEE2DDE4C8DFE6E3E8E5E0DAE7E1EBCFDBEDE9EFEAA2C3BF1AF8C9FAC8F917FB02FAE3077020A8040021F904090A0000002C0000000080000F000003FF08B40BFE22C607A5A0CE5EAC31E89CE581145949A318A24C5B6A5B06BF261C7FF3A9CA75CEEFB89EA6C5A0016D46944EF963068FBEA713B99C5405C4C635696D76A55FAAF7260693A3655B96C03D0BA1EF297A1E0FD32DEBB67ECB1FEFFD7D667F667981697772756E708C898D11858092828688768A83871A059C9D051403A1A203A0A3A1A5A6A8A3AAA2ACA70FA6AF0EB1A4B0B1AEB5B3B19E9DB8BEB6A9C0ABC2ADC4B200B4BFBAC1CBC3CDA2BC9CCAC8B7C6B9D4CCD8CEDAC5CFC7C9D6D3B4D19FE1E6DED7E0E8E2D5EBE7DCDFBBD1ECD9EAF0E9EDF7F4DBF6FDF2BCFBBAE97BE7AF5EBE82FC0EDE028821DB330F0EB941DCF6B021458916055664052001010021F904090A0000002C0000000080000F000003FF08B40BFEAC3D276A9DD40A0CF4C61E17829A58929699A257C44CAE948DF359AFF7F5787AFEF913DEAFC30BF2620458CC482336854C9B530ADD15ADCFAB0FA974457153701588A56AC33DF470ACE6429665F1994D9FDBB378B3C7EDE0ABBF697579728381777A1A7E7E8288848D86856B878E168A7064987F71908F9291809E1A05A3A40513A5A41303ABAC03AAADABAFB0B2ADB4ACB6B10FB0B90EBBAEBABBB803A8A3A7C4C2C8C0B3CAB5CCB7CEBC00BEC9BDC1D0C3C70FC4A6D7D4D2D6D5CBE1CDE3CFE5D1D3DDD7DBC6A8DEE9E7BFF1EFE0DFE2F6E4F8E6FAABECDAD9F3D4051CC84F5E417AF7E015F4E780E141810F092A9C588F62C260EE3064B4C5E10F5EB98EF93E62F0A80FE43E911C13000021F904090A0000002C0000000080000F000003FF08B40BFEAC3D17C97422E70BF4BE9EC085A3576AE73791A05949D43BBDD613AADDBDEA368FF939D64F1834F542B4990CB21C1A9DA8E3B31885E26E2269957ABD2599156558DB25627766E0999CB5B6B9826F6C3C8FA0A76BF77D9B87EFCB785E4D0A83727E6C7F6F7D8B6A8D6948859174877A88969598949A58869D838C8F81A17C8EA2A61A05A9AA0513ABAAADAEAC0F03B4B50313B6B5B8B9B7B3BCBBB9C0B6C2BABEC1C6B6B1B20ECAB0AEC4B4D0BD0EBCD300D5D2D9C8C5D4BFDBB4CD0FE1CCB1DADDC7E7C3DFD6D8EBE6D7DEE9B5E300F4F4EDF2D1EEFBF9ECF1F0E800AAEB67AF9C3883FDDEE113C88DA1BE84FC1CFACB55F0D9418B10334A54F86F1AA1C78EBF305E4CC541A43C0E014F5E48C910E5C06D2E1B9E4C000021F904090A0000002C0000000080000F000003FF08B40BFEAC3D17C9A4F102C1B9EEDE050A1F587667388D2959495835BD16F4AE23F9E4BAC3E3AC5D0E6812067D39DAEC66933533C622F2B8194651575595FACB0A944FC6D219834EA55B74F78C656BD7E9769C032E8BC33005D3DD9BF7E180567C44723C757A6488668A77835E846F827E907F92867B8C798787815C969F9EA16A49989BA5989DA3A285A0AAAE1D05B1B20513B3B2B5B6B40FB9BA0E03BFC00313C1C0C3C4C20FC7C8BEC7C6C4CEC1D0C0BCB8B6D5B3D7B7C9CDDBCFDDD1DFC5E1BFD2E4E3CB00CAD4BBB9D9B1EEBDE9DCCCDEF4E0F6E2F8E6FAE8CAE503EB1C04043070A0BF73FF12225CC8EF5FC176ECAC45C4C6505E3D8BF730E6D3B88F2B63BF791E1F4A140891E4488F0A1B563CA8B225CA9326DF5D804990A2340D17F1E1CCA8F3424E8D3B8B25000021F904090A0000002C0000000080000F000003FF08B40BFEAC3D17C9A4F1AA7C85F7DA07766258929F99A2602561D5E45A902BDB8FB83AFAC8F7939E2008CC157FBAD92D5663C2384F0651373D21AD006175973D7693B8E86BE32443CD5223558DD5B2B9EE2BBCA76C9EEB625A7EEBFBB6BD717E736B721E786863878A61827D818F8091848D028B6596778C90939B7F9C922298697B76A3887A947C436F8EA0839E2205B2B30513B4B3B6B7B50FBABB0EBD1303C2C303C1C4C2C6C7C9C4CBC3CDC80FC7C2C0BCBAB9B7D7B4D9B8D1D2CFC5DDCAE1CCE3CEE5D00ED203D4BFD6D5D8EFDAF1DCE9DEE7E0F5E2F9E4FBE6FDE800D4B10330B0A0BB76F0FEE10B684FE1B787F7BE194C48F060458A03D5417418B12D23478513E52114799164C6860CF5A5E4B7D25F4B801A23521CE96B9E8699256BF6D3A072E7859E2D79B2DC99000021F904090A0000002C0000000080000F000003FF08B40BFEAC3D17C9A4F1AA7CAB1620F885C2189AE245962AB9795065C53056BF9C9D036BEAF4AC5F6F02240E1F40D94CC798289D32E8ED893C0A57466C557B756D4954A644BCC43569BB30CFBAE6B6BDDDD3571E07A9EF51F4992CDD15E73E6F7482817F75027853797C7A63668E8684419259709480888B8F6589699A6A91A16CA26E499FA78AA99E37A496AD83AF2005B3B40513B5B4B7B8B60FBBBC0EBEBAB81303C5C603C4C7C5C9CACCC7CEC6D0C5C1BDBBC2B5D7B9D5C3DBD80FCACBDFE0D2C8E2CDE6CFE8C6D4C0D6DDDAEDDCF1DEF3F000E0E50EF8E4FCEAE1FAE0D8011048D05DBD59D910FACB776FDCC27E00CF453C5650DE4083172D56A4D7503362C77413A33D1C19721AC68DF6502A3CF8EBA3C8920CF79174F98F26328BF534E0CCB8F29D4E8E2135780C7A61A84BA1CF12000021F904090A0000002C0000000080000F000003FF08B40BFEAC3D17C9A4F1AA7CABF697208ADA48866699A2E30662AFCBC1B3CC4C9544DF8FD9F63EC1242804FA86C19C0592C3359931A533FA74109147E3CA1AC49AA4D01A78A7B395C7E62537BBDE02AEDA5F7B84AE57D353F11D0D9F9FFC45805E747B8554877A883C82717F6F5D8D818F3E768A678689998B936E7D9C729F8E44959A97966A78619B9EAC908C8005B1B20513B3B2B5B6B40FB9BA0EBCB8B6C0B31303C5C603C4C7C5C9CACCC7CEC6BFBBB9C2B7D3C1D7C3D9D6BED40FCACBDFE0D0E10EE0C8E2CAD2DDD8ECDAEEDC00EBF2DEF0B1E4E8E6E3E9CFFCC6F8F302D6A3D78EE03B83F1E69DC3C7D05F3900E7041694789062C2810B1DE683B84F2E5F338D16EF6D1369AF174292274D2AECC8F1A3C77E2FFF6944A8A120BC9A076F5EB049F3824B7F1A7EC60CFA2C010021F904090A0000002C0000000080000F000003FF08B40BFEAC3D17C9A4F1AA7CABF61D370924A995E6850A27BA8118FC8A333355524CE316848F2BD623287410812BDEEDE793299B3BA6CE06A51A8348D710BB4D4A6B39706F1A7E92C7E2A5ECD8D55E57D992395D2D7FE7F8FB97FD7603F87F41794E7A848651875681706D2571297D728588948A8395766B5C91908B7E44979693A28999986880A99B9E2505AEAF0513B0AFB2B3B10FB6B70EB9B5B3BDB0BFB40F03C4C50313C6C5C8C9C7C3CCBCB8B6C1AED3BA00D0BBD2D1BEDBC0CEC9CBE0DFC6E1C6D8D7DAD9DCEADEECC2EED4DDEFE8EB00CCCD0EF7E5CAE3C5E7FFE9E8B513380F60BD73FAFA11DBB750E100830321160C28311E3C6B09F3316388CF27DE338A200F868C387262BD8C1EC5695499925C3D771A5E128C3910E605993259AE6CB84F03B8040021F904090A0000002C0000000080000F000003FF08B40BFEAC3D17C9A4F1AA7CABF61D378193609ADA895EAAB091AF1833636541760DDB37B6E78FD6CA217405853C9D2C89FB3997401F14562C09AD2DA694D69C7AB95B49B8371397C9D5630BABD29E95E07737EEAE47E5C4AB5AC53ED99F74777F5F66837169796B7B7E828D80858E8464866688009645949391818F9B9E70957A897C8B2605A8A90513AAA9ACADAB0FB0B10EB3AFADB7AAB9AEB2B01303C0C103BFC2C0C4C5B6BDB8CABACCBCB5BECEA8BBD3D2B400C90EC5C60FDBC3DDDBD9D8D1D0CBE5CDE7CFE3E6EBE8EDEAE2DEC7C2F3C1E2F7E4EFD5E9FBFAD7F8ECE26DABC74D5BB87C00DD258487B061C07CF2C015233860613F8BFF1C2AD4C8901B5D44831325D263974E03C97726DD95BC70B2A54A0021EB699898000021F904090A0000002C0000000080000F000003FF08B40BFEAC3D17C9A4F1AA7CABF61D3781A3F80828AAA56A2561E416BB16E496F36DE7BCC9A6931F8A86331177461D2CD963149D48A84328080A8F4BA98CC9D562B75E25F835AE4D85D6DF772D6637C9EE2E5C4C4DB3E2E1B7B9FC9CEBFB7B5F7527576D867F517E7281878B7640846A8D798E898C88598A945A83673F05A0A10513A2A1A4A5A30FA8A90EABA7A5AFA2B1A6AAA8B3A01303BABB03B9BCBAAEB5B0C2B2C4B4ADB6C6B8CAAC00C1C8C3D0C50EBFBABEBFCFCEC9D2C7DAD1DED3E0DDD9E4DBE2CBD4D5D7BCE5DFEDE1EFE3E6F1E8E7CDD5BD0FF8F4CDFCB7FDF302BA13180EDFBA5DFE98FD5BA8B021B77A09D3FD3A68ED1B370D16C5610C77F10C42C68F1C355E9838921780040021F904090A0000002C0000000080000F000003FF08B40BFEAC3D17C9A4F1AA7CABF61D3781A308998EA0AA1BD99A9584B9B175D27189EF70FEACC09AAEC7630C8D37A212395BCA5E4C0070254C46ABCDAB2FFBC442BBDBAF8D3B964E05DE74585D04B7CB6C67F98C5EDBDF47B73C0FBFEF7F67715A78567A837F647C8A805382868F7D8489859188621374059A9B05139C9B9E9F9D0FA2A30EA5A19FA99CABA0A4A2AD9AB1A60003B6B703A8AFAABBACBDAEA7B0BFB2C3B4BAC1BCC8BECAC0B5B8B6C700D1D3C2CCC4D6C6D5D2DAD4C9DBDECFD0DCE3DEDDCBDFE7E6CDEAD7E8CDE1B9E4E9F2EBF4EDECD9E5F6B4F0F8B3FFC5006213E8EEDEBE09F0DC69F0C66CE1B98617182A8CF870622B87CD1C3C0390000021F904090A0000002C0000000080000F000003E708B40BFEAC3D17C9A4F1AA7CABF61D3781A3089918B391AB5949A9FB96EC6B9DF58CCBB9DDF340D54E1823B68C365A107664FA744527B4798B56A94AE4343994FE9E57AE35EB5D86B7E86F590B5EBBCF6AB8992C67CFBB3EBA1EBF1FF3FF7E81587862838285886977878A760C059091051392919495930F98990E9B97959F92A1969A98A390A79C009B9EA5A0AEA2B0A49DA6B2A8B6AAADB4AFBBB1BDB3ABACBCC1C3BAC4BEC7C0C6CBB5BFB7CEB9CDC9C2A9D5B8D6D0D8D3D1C5D2CCC2CADEE2DDE4C8DFE6E3E8E5E0DAE7E1EBCFDBEDE9EFEAA2C3BF1AF8C9FAC8F917FB02FAE3077020A804003B000000000000000000

  6. #6
    Membre régulier
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Novembre 2012
    Messages
    54
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Technicien maintenance
    Secteur : Finance

    Informations forums :
    Inscription : Novembre 2012
    Messages : 54
    Points : 76
    Points
    76
    Par défaut
    Citation Envoyé par skymike03 Voir le message
    Salut,

    Merci de ta réponse intéressante ! D'accord pour l'interface graphique.

    Ce que j'aimerai savoir maintenant, c'est "convertir" les commande du Batch ou VB et j'ai du mal à trouver tout ça malheuresement, je fais des recherche pourtant...

    Merci
    J'ai quelque chose qui pourras t'intéresser :
    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
    172
    173
    	<HTML>
    	<HEAD>
    	<TITLE>Utilitaire Windows</TITLE>
        <HTA:APPLICATION
        APPLICATIONNAME="Utilitaire Windows"
        BORDER="THIN"
        BORDERSTYLE="NORMAL"
        ICON="regedit.exe"
        INNERBORDER="NO"
        MAXIMIZEBUTTON="NO"
        MINIMIZEBUTTON="NO"
        SCROLL="NO"
        SELECTION="NO"
    	SYSMENU="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 Titre
    				Titre = "Utilitaire Windows"
    'Fenetre Windows
    				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
    'Position Windows	
    				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
     
    'Nettoyage de disique 			
     
    				SUB Nettoi()
    				Self.document.title = Titre
    				CALL InnerWindowSize(401,402)
    				ONSCR.InnerHTML="<TABLE HEIGHT=""50"" WIDTH=""399"" 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"">Nettoyage de PC</FONT></CENTER></TD></TR></TABLE>"_
    				&"<TABLE WIDTH=""400"" HEIGHT=""300"" BORDER=""1"" BGCOLOR=""#BBBFFF"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<tr><td align=""center""> Le Nom de l'ordinateur est :<FONT COLOR=""Red"">"& GetComputerName &"</FONT></td></tr>"_
    				&"<tr><td align=""center""> User : <FONT COLOR=""Red"">"& GetUserName &"</FONT></td></tr>"_
    				&"<tr><td align=""center""> Adresse IP : <FONT COLOR=""Red"">"& GetIP &"</FONT></td></tr>"_
    				&"<tr><td align=""center""> Mask network : <FONT COLOR=""Red"">"& GetIPMask &"</FONT></td></tr>"_
    				&"<tr><td align=""center""> Gateway : <FONT COLOR=""Red"">"& GetIPGt &"</FONT></td></tr>"_
    				&"<tr><td align=""center""> DNS : <FONT COLOR=""Red"">"& GetIPdns &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><INPUT TYPE=""button"" STYLE=""HEIGHT:25;WIDTH:165"" NAME=""LogiBor"" VALUE=""Nettoyage Windows"" onClick=""Netto()""</td></tr>"_
    				&"</TABLE>"_
    				&"<TABLE HEIGHT=""50"" WIDTH=""399"" BORDER=""1"" BGCOLOR=""#BBBFFF"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:165"" VALUE=""Fermer"" ONCLICK=""window.close()""></CENTER></TD></TR></TABLE>"
    				END SUB
    'Adresse ip
    				Function GetIP()
    					Dim strComputer,objWMIService,colNetAdapters,strDetails,objAdapter
    					strComputer = "."
    					Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    					Set colNetAdapters = objWMIService.ExecQuery _
    					("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=True")
    					strDetails = ""
    					For Each objAdapter In colNetAdapters
    						If IsNull(objAdapter.IPAddress) = False And IsNull(objAdapter.DefaultIPGateway) = False Then
    							If Join(objAdapter.IPAddress) <> "0.0.0.0" Then
    								If strDetails = "" Then
    									strDetails = Join(objAdapter.IPAddress)
    								End If
    							End If
    						End If
    					Next
    					GetIP = strDetails
    				End Function
    'Masque réseaux				
    				Function GetIPMask()
    					Dim strComputer,objWMIService,colNetAdapters,strDetails,objAdapter
    					strComputer = "."
    					Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    					Set colNetAdapters = objWMIService.ExecQuery _
    					("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=True")
    					strDetails = ""
    					For Each objAdapter In colNetAdapters
    						If IsNull(objAdapter.IPAddress) = False And IsNull(objAdapter.DefaultIPGateway) = False Then
    							If Join(objAdapter.IPAddress) <> "0.0.0.0" Then
    								If strDetails = "" Then
    									strDetails = Join(objAdapter.IPSubnet)
    								End If
    							End If
    						End If
    					Next
    					GetIPMask = strDetails
    				End Function
    'Passerelle réseau
    				Function GetIPGt()
    					Dim strComputer,objWMIService,colNetAdapters,strDetails,objAdapter
    					strComputer = "."
    					Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    					Set colNetAdapters = objWMIService.ExecQuery _
    					("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=True")
    					strDetails = ""
    					For Each objAdapter In colNetAdapters
    						If IsNull(objAdapter.IPAddress) = False And IsNull(objAdapter.DefaultIPGateway) = False Then
    							If Join(objAdapter.IPAddress) <> "0.0.0.0" Then
    								If strDetails = "" Then
    									strDetails = Join(objAdapter.DefaultIPGateway)
    								End If
    							End If
    						End If
    					Next
    					GetIPGt = strDetails
    				End Function
    'DNS
    				Function GetIPdns()
    					Dim strComputer,objWMIService,colNetAdapters,strDetails,objAdapter
    					strComputer = "."
    					Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    					Set colNetAdapters = objWMIService.ExecQuery _
    					("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=True")
    					strDetails = ""
    					For Each objAdapter In colNetAdapters
    						If IsNull(objAdapter.IPAddress) = False And IsNull(objAdapter.DefaultIPGateway) = False Then
    							If Join(objAdapter.IPAddress) <> "0.0.0.0" Then
    								If strDetails = "" Then
    									strDetails = Join(objAdapter.DNSServerSearchOrder)
    								End If
    							End If
    						End If
    					Next
    					GetIPdns = strDetails
    				End Function
    'Compte utilisateur
    				Function GetUserName()
    				Dim objNetwork
    				Set objNetwork = CreateObject("WScript.Network")
    				GetUserName = objNetwork.UserName
    				End Function
    'Nom PC
    				Function GetComputerName()
    				Dim objNetwork
    				Set objNetwork = CreateObject("WScript.Network")
    				GetComputerName = objNetwork.ComputerName
    				End Function
    'Programe Nettoyage
    				Sub Netto()
    				Dim Ws
    				Set WS = CreateObject("WScript.shell")
    				Msgbox "Fermeture de tous les programmes",64,Titre
    				WS.run "cmd.exe /c Taskkill /f /im iexplore.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im outlook.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im winword.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im excel.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im searchindexer.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im searchprotocolhost.exe",0, True
    				Msgbox "Suppression veille prolongée",64,Titre
    				WS.run "powercfg -h off",0, True
    				WS.run "cmd.exe /c del /s /q C:\MSOCACHE\*.*",0, True
    				Msgbox "Nettoyage IE",64,Titre
    				WS.run "Rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 8",0, True
    				WS.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2",0, True
    				Msgbox "Nettoyage disque Windows en mode silencieux",64,Titre
    				WS.run "cmd.exe /c del /s /q %userprofile%\*.tmp",0, True
    				WS.run "cmd.exe /c del /s /q c:\windows\*.tmp",0, True
    				Msgbox "Suppression des points de restauration Windows sur C: et taille maxi 500Mo",64,Titre
    				WS.run "vssadmin delete shadows /all /quiet"
    				WS.run "vssadmin resize shadowstorage /For=c: /On=c: /MaxSize=500MB"
    				WS.run "cmd.exe /c del /s /q c:\windows\*.dmp",0, True
    				WS.run "cmd.exe /c del /s /q c:\windows\temp\*.*",0, True
    				Msgbox "Vidage des sauvegarde de fichiers OST outlook",64,Titre
    				WS.run "cmd.exe /c del /s /q %localappdata%\microsoft\outlook\*.old",0, True
    				WS.run "cmd.exe /c del /s /q %localappdata%\microsoft\outlook\*.bak",0, True
    				Msgbox "Opération terminée !",64,Titre
    				end sub
    				call Nettoi()
    	</script>
    J'ai fais ça pour ma boite aussi

    Code de noob


    A +

  7. #7
    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
    et bien joué sovan et vous avez un +1 de ma part
    Chuuuuuut, je crois que skymike03 a oublié de revisiter cette discussion

  8. #8
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut
    Super merci a vous .

    Sovan je suis en train de m'inspirer de ton script, mais il me semble que tu l'a modifié déja pas mal pour correspondre a mes attentes

    La je planche sur quelque chose, j'ai supprimé les infos concernant les ip qui ne me servaient pas, ainsi que les boite de dialogue pendant le nettoyage.

    J'ai intégré un MSGBOX qui demande le nom d'utilisateur, et qui le place dans une variable.

    mais je ne sais pas remplacer par exemple "%localappdata%\microsoft\outlook\*.old"
    par c:\users\MAVARIABLE\appdata...

    en gros comment recupérer dans ma commande dos, la variable déclaré en VBS ?

  9. #9
    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
    skymike03
    Montre nous ton nouveau script

  10. #10
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut
    hello,

    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
    	<HTML>
    	<HEAD>
    	<TITLE>Nettoyage PC</TITLE>
        <HTA:Application
    Caption = Yes
    Icon = "Cleanmgr.exe"
    ShowInTaskBar = Yes
    SingleInstance = Yes
    MaximizeButton = Yes
    MinimizeButton = Yes
    Border = Thick
    SCROLL="NO">
    </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 Titre
    				Titre = "Nettoyage PC"
    'Fenetre Windows
    				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
    'Position Windows	
    				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
     
    'Nettoyage de disque 			
     
    				SUB Nettoi()
    				Self.document.title = Titre
    				CALL InnerWindowSize(401,402)
    				ONSCR.InnerHTML="<TABLE HEIGHT=""200"" WIDTH=""399"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><FONT COLOR=""#FFFFFF"" SIZE=""+2"" FACE=""VERDANA,ARIAL,HELVETICA,SANS-SERIF"">Nettoyage PC Beta1</FONT></CENTER></TD></TR></TABLE>"_
    				&"<TABLE WIDTH=""400"" HEIGHT=""100"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#FFFFFF"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Etiquette de poste :</FONT> <FONT COLOR=""Red"">"& GetComputerName &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Nom d'utilisateur :</FONT> <FONT COLOR=""Red"">"& nomuser &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><INPUT TYPE=""button"" STYLE=""HEIGHT:25;WIDTH:165"" NAME=""LogiBor"" VALUE=""Nettoyage Windows"" onClick=""Netto()""</td></tr>"_
    				&"</TABLE>"_
    				&"<TABLE HEIGHT=""100"" WIDTH=""399"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:65"" VALUE=""Fermer"" ONCLICK=""window.close()""></CENTER></TD></TR></TABLE>"
    				END SUB
     
    'Compte utilisateur
    				'Function GetUserName()
    				'Dim objNetwork
    				'Set objNetwork = CreateObject("WScript.Network")
    				'GetUserName = objNetwork.UserName
    				'End Function
     
    'Demander le nom d'utilisateur				
    				Function DemandeUser ()
    				Dim nomuser 
    				nomuser = InputBox("Nom d'utilisateur ?", "Demande d'information", "PNOM")
    				End Function
    'Nom PC
    				Function GetComputerName()
    				Dim objNetwork
    				Set objNetwork = CreateObject("WScript.Network")
    				GetComputerName = objNetwork.ComputerName
    				End Function
    'Programe Nettoyage
    				Sub Netto()
    				Dim Ws
    				Set WS = CreateObject("WScript.shell")
    				'WS.run "cmd.exe /c Taskkill /f /im iexplore.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im outlook.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im winword.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im excel.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im searchindexer.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im searchprotocolhost.exe",0, True
    				'WS.run "powercfg -h off",0, True
    				'WS.run "cmd.exe /c del /s /q C:\MSOCACHE\*.*",0, True
    				'WS.run "Rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 8",0, True
    				'WS.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2",0, True
    				'WS.run "cmd.exe /c del /s /q %userprofile%\*.tmp",0, True
    				'WS.run "cmd.exe /c del /s /q c:\windows\*.tmp",0, True
    				'WS.run "vssadmin delete shadows /all /quiet"
    				'WS.run "vssadmin resize shadowstorage /For=c: /On=c: /MaxSize=500MB"
    				'WS.run "cmd.exe /c del /s /q c:\windows\*.dmp",0, True
    				'WS.run "cmd.exe /c del /s /q c:\windows\temp\*.*",0, True
    				WS.run "cmd.exe /c del /s /q %nomuser%\microsoft\outlook\*.old",0, True
    				WS.run "cmd.exe /c del /s /q %nomuser%\microsoft\outlook\*.bak",0, True
    				'WS.run "cmd.exe /c powershell \\bcnvdat007\refbin\dos\pagefiled.ps1",0, True
    				Msgbox "Nettoyage terminé !",64,Titre
    				end sub
    				call Nettoi()
    	</script>
    Je n'ai pas changé grand chose pour le moment, le but principal etant de pouvoir renseigner le nom d'utilisateur via une boite de dialogue, et de l'utiliser en variable par la suite. Je n'ai laissé qu'une seule des commandes
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    WS.run "cmd.exe /c del /s /q %nomuser%\*.tmp",0, True
    volontairement pour alleger le script et ne pas refaire tout le processus de nettoyage a chaque fois

    en plus je viens de tester de nouveau ce matin, et les deux lignes de code qui sont censés afficher la MSGBOX demandant le nom d'utilisateur ne fonctionnent plus?? La boite ne s'affiche plus

  11. #11
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut
    J'ai remodifié, voici le code qui "fonctionne"
    La boite s'affiche bien dès l'ouverture, et le texte rentré apparait bien a l'ecran après.

    il ne me reste plus qu'a trouver comment le récuperer dans mes commande batch.. car ce que j'ai fait ne renvoi aucune erreur mais ne supprime pas les fichiers



    edit : je suis trop con, j'avais oublié le dossier "Local" après "Appdata"

    ce script fonctionne , et prends ma variable correctement :





    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
    	<HTML>
    	<HEAD>
    	<TITLE>Nettoyage PC</TITLE>
        <HTA:Application
    Caption = Yes
    Icon = "Cleanmgr.exe"
    ShowInTaskBar = Yes
    SingleInstance = Yes
    MaximizeButton = Yes
    MinimizeButton = Yes
    Border = Thick
    SCROLL="NO">
    </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 Titre
    				Titre = "Nettoyage PC"
    'Fenetre Windows
    				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
    'Position Windows	
    				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
     
    'Nettoyage de disque 			
     
    				SUB Nettoi()
    				Self.document.title = Titre
    				CALL InnerWindowSize(401,402)
    				ONSCR.InnerHTML="<TABLE HEIGHT=""200"" WIDTH=""399"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><FONT COLOR=""#FFFFFF"" SIZE=""+2"" FACE=""VERDANA,ARIAL,HELVETICA,SANS-SERIF"">Nettoyage PC Beta1</FONT></CENTER></TD></TR></TABLE>"_
    				&"<TABLE WIDTH=""400"" HEIGHT=""100"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#FFFFFF"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Etiquette de poste :</FONT> <FONT COLOR=""Red"">"& GetComputerName &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Nom d'utilisateur :</FONT> <FONT COLOR=""Red"">"& nomuser &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><INPUT TYPE=""button"" STYLE=""HEIGHT:25;WIDTH:165"" NAME=""LogiBor"" VALUE=""Lancer le Nettoyage"" onClick=""Netto()""</td></tr>"_
    				&"</TABLE>"_
    				&"<TABLE HEIGHT=""100"" WIDTH=""399"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:65"" VALUE=""Fermer"" ONCLICK=""window.close()""></CENTER></TD></TR></TABLE>"
    				END SUB
     
    'Compte utilisateur
    				'Function GetUserName()
    				'Dim objNetwork
    				'Set objNetwork = CreateObject("WScript.Network")
    				'GetUserName = objNetwork.UserName
    				'End Function
     
    'Demander le nom d'utilisateur				
    				Dim nomuser
    				nomuser = InputBox("Nom d'utilisateur ?", "Demande d'information", "PNOM")
     
    'Nom PC
    				Function GetComputerName()
    				Dim objNetwork
    				Set objNetwork = CreateObject("WScript.Network")
    				GetComputerName = objNetwork.ComputerName
    				End Function
    'Programe Nettoyage
    				Sub Netto()
    				Dim Ws
    				Set WS = CreateObject("WScript.shell")
    				'WS.run "cmd.exe /c Taskkill /f /im iexplore.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im outlook.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im winword.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im excel.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im searchindexer.exe",0, True
    				'WS.run "cmd.exe /c taskkill /f /im searchprotocolhost.exe",0, True
    				'WS.run "powercfg -h off",0, True
    				'WS.run "cmd.exe /c del /s /q C:\MSOCACHE\*.*",0, True
    				'WS.run "Rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 8",0, True
    				'WS.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2",0, True
    				'WS.run "cmd.exe /c del /s /q %userprofile%\*.tmp",0, True
    				'WS.run "cmd.exe /c del /s /q c:\windows\*.tmp",0, True
    				'WS.run "vssadmin delete shadows /all /quiet"
    				'WS.run "vssadmin resize shadowstorage /For=c: /On=c: /MaxSize=500MB"
    				'WS.run "cmd.exe /c del /s /q c:\windows\*.dmp",0, True
    				'WS.run "cmd.exe /c del /s /q c:\windows\temp\*.*",0, True
    				WS.run "cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\microsoft\outlook\*.old",0, True
    				WS.run "cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\microsoft\outlook\*.bak",0, True
    				'WS.run "cmd.exe /c powershell \\bcnvdat007\refbin\dos\pagefiled.ps1",0, True
    				Msgbox "Nettoyage terminé !",64,Titre
    				end sub
    				call Nettoi()
    	</script>

  12. #12
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut
    Par contre chose TRES TRES importante.

    80% des utilisateurs ne sont pas administrateurs de leurs postes

    donc, certaines commandes ne fonctionneront pas..

    Quand j'avais mon script en batch, je pouvais l'executer en tant qu'admin, l'UAC s'affiche, je rentre mes identifiants, et c'est parti.. ce n'est pas pareil avec le VBS il n'y a pas cette option... Comment Puis-je faire?



    j'ai trouvé en modifiant une clé de registre qui permet d'ajouter le menu "executer en tant que" au clic droit sur VBS ou HTA, mais bon je ne peux pas le faire a chaque fois..

    J'ai alors fait un bat, qui , quand on le lance en admin, modifie la clé de registre et lance le vbs que j'ai mis sur un serveur.. sauf que je ne sais pas si le VBS se lance avec les droits administrateurs ?

    Mon but etant de n'avoir qu'un fichier a lancer sur le poste d'utilisateur.

  13. #13
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut
    voici mon script a l'etat actuel , j'ai rajouté l'affichage de l'espace disponible sur C:

    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
    	<HTML>
    	<HEAD>
    	<TITLE>Nettoyage PC</TITLE>
        <HTA:Application
    Caption = Yes
    Icon = "Cleanmgr.exe"
    ShowInTaskBar = Yes
    SingleInstance = Yes
    MinimizeButton = Yes
    Border = Thick
    SCROLL="NO">
    </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 Titre
    				Titre = "Nettoyage PC"
    'Fenetre Windows
    				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
    'Position Windows	
    				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
     
    'Nettoyage de disque 			
     
    				SUB Nettoi()
    				Self.document.title = Titre
    				CALL InnerWindowSize(401,402)
    				ONSCR.InnerHTML="<TABLE HEIGHT=""200"" WIDTH=""399"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><FONT COLOR=""#FFFFFF"" SIZE=""+2"" FACE=""VERDANA,ARIAL,HELVETICA,SANS-SERIF""><marquee>Nettoyage PC Beta1</marquee></FONT></CENTER></TD></TR></TABLE>"_
    				&"<TABLE WIDTH=""400"" HEIGHT=""200"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#FFFFFF"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Etiquette de poste :</FONT> <FONT COLOR=""Red"">"& GetComputerName &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Nom d'utilisateur :</FONT> <FONT COLOR=""Red"">"& nomuser &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Espace Disque Disponible :</FONT> <FONT COLOR=""Red"">"& diskspace &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><INPUT TYPE=""button"" STYLE=""HEIGHT:25;WIDTH:165"" NAME=""LogiBor"" VALUE=""Lancer le Nettoyage"" onClick=""Netto()""</td></tr>"_
    				&"</TABLE>"_
    				&"<TABLE HEIGHT=""100"" WIDTH=""399"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><INPUT TYPE=""BUTTON"" STYLE=""HEIGHT:25;WIDTH:65"" VALUE=""Fermer"" ONCLICK=""window.close()""></CENTER></TD></TR></TABLE>"
    				END SUB
     
    'Demander le nom d'utilisateur				
    				Dim nomuser
    				nomuser = InputBox("Exemple : P.NOM", "Nom d'utilisateur?", "")
    'Espace disque disponible
    				Dim fs, nomdisk, diskspace
    				Set fs = CreateObject ("Scripting.FileSystemObject")
    				Set nomdisk = fs.GetDrive(fs.GetDriveName("C:\"))
    				diskspace = FormatNumber(nomdisk.FreeSpace/1073741824, 0) & " Go libres"
    'Nom PC
    				Function GetComputerName()
    				Dim objNetwork
    				Set objNetwork = CreateObject("WScript.Network")
    				GetComputerName = objNetwork.ComputerName
    				End Function
    'Programe Nettoyage
    				Sub Netto()
    				Dim Ws
    				Set WS = CreateObject("WScript.shell")
    				Msgbox "Merci d'enregistrer votre travail, tous les programmes seront fermés !",64,Titre
    				WS.run "cmd.exe /c Taskkill /f /im iexplore.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im outlook.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im winword.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im excel.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im searchindexer.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im searchprotocolhost.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im UcMapi.exe",0, True
    				Msgbox "Les processus Internet Explorer, Outlook, Word, Excel et Windows Search ont été quittés",64,Titre
    				WS.run "powercfg -h off",0, True
    				WS.run "cmd.exe /c del /s /q C:\MSOCACHE\*.*",0, True
    				WS.run "Rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 8",0, True
    				WS.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2",0, True
    				WS.run "cmd.exe /c del /s /q %userprofile%\*.tmp",0, True
    				WS.run "cmd.exe /c del /s /q c:\windows\*.tmp",0, True
    				WS.run "vssadmin delete shadows /all /quiet"
    				WS.run "vssadmin resize shadowstorage /For=c: /On=c: /MaxSize=500MB"
    				WS.run "cmd.exe /c del /s /q c:\windows\*.dmp",0, True
    				WS.run "cmd.exe /c del /s /q c:\windows\temp\*.*",0, True
    				WS.run "cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\microsoft\outlook\*.old",0, True
    				WS.run "cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\microsoft\outlook\*.bak",0, True
    				WS.run "cmd.exe /c powershell \\bcnvdat007\refbin\dos\HL\pagefiled.ps1",0, True
    				Msgbox "Nettoyage terminé !",64,Titre
    				end sub
    				call Nettoi()
    	</script>

  14. #14
    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

  15. #15
    Membre régulier
    Homme Profil pro
    Technicien maintenance
    Inscrit en
    Novembre 2012
    Messages
    54
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Technicien maintenance
    Secteur : Finance

    Informations forums :
    Inscription : Novembre 2012
    Messages : 54
    Points : 76
    Points
    76
    Par défaut
    Cool !!!

    Moi j'utilise l'application Psexec.exe !!
    Je ne sais si t'utilise ça dans ta boite !

    Attention il faut bien mettre ( mdpasse ") avec un espace.

    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
     
    	dim AdmPsec
    	AdmPsec = "c:\Windows\psexec.exe -u admin -p mdpasse "
     
    Sub Netto()
                                    'Pour voir si le code est bien écrit
                                    Msgbox AdmPsec & "cmd.exe /c Taskkill /f /im iexplore.exe"
    				Dim Ws 
    				Set WS = CreateObject("WScript.shell")
    				Msgbox "Merci d'enregistrer votre travail, tous les programmes seront fermés !",64,Titre
    				WS.run ""& AdmPsec &"cmd.exe /c Taskkill /f /im iexplore.exe",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c taskkill /f /im outlook.exe",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c taskkill /f /im winword.exe",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c taskkill /f /im excel.exe",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c taskkill /f /im searchindexer.exe",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c taskkill /f /im searchprotocolhost.exe",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c taskkill /f /im UcMapi.exe",0, True
    				Msgbox "Les processus Internet Explorer, Outlook, Word, Excel et Windows Search ont été quittés",64,Titre
    				WS.run ""& AdmPsec &"powercfg -h off",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c del /s /q C:\MSOCACHE\*.*",0, True
    				WS.run ""& AdmPsec &"Rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 8",0, True
    				WS.run ""& AdmPsec &"RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c del /s /q %userprofile%\*.tmp",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c del /s /q c:\windows\*.tmp",0, True
    				WS.run ""& AdmPsec &"vssadmin delete shadows /all /quiet"
    				WS.run ""& AdmPsec &"vssadmin resize shadowstorage /For=c: /On=c: /MaxSize=500MB"
    				WS.run ""& AdmPsec &"cmd.exe /c del /s /q c:\windows\*.dmp",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c del /s /q c:\windows\temp\*.*",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\microsoft\outlook\*.old",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\microsoft\outlook\*.bak",0, True
    				WS.run ""& AdmPsec &"cmd.exe /c powershell \\bcnvdat007\refbin\dos\HL\pagefiled.ps1",0, True
    				Msgbox "Nettoyage terminé !",64,Titre
    				end sub
    call Nettoi()
    Si tu veux que les utilisateurs ne puisse pas voir le code ou le mot de passe
    tu peux crypter ton fichier Nettoyage.hta

    en utilisant screnc.exe ( Tu peux télécharger sur internet )

    Tu peu créer un ptit fichier Encrypte.bat
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Screnc /e Nettoyage.hta  Nettoyage_Crypter.hta
    Puis voila !!!

    J’espère que j'ai répondu à ta question.

  16. #16
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut
    hello,

    pour le context menu ce n'est pas possible car il faudrait lancer le reg sur le poste, puis le script en admin, et il ne me faut qu'un seul fichier.

    pour psexec c'est bien mais il faut qu'il soit présent sur le poste de l'utilisateur aussi, donc ce qui induit la copie.

    J'ai pas pu tester encore sur une session non admin, mais j'ai converti simplement mon HTA en EXE... cependant je ne sais pas si en le lancant en admin ça effectue bien les commandes en admin

    Nouvelle sollicitation, Ligne 68

    Lors du clic sur Nettoyage, il affiche un message indiquant que tous les programmes vont etre fermés. J'aimerais que lorsqu'on clique sur Non, la fenetre se ferme tout simplement. Hors, la elle se ferme mais le script continue (donc idem que le clic sur ok)

    ce qui fait que tous les programmes se ferment quand même.

    actullement j'ai ça qui "fonctionne" dans le sens ou quand je clic non, il ne continue pas car il affiche une erreur de script si je clique sur Non.

    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
    	<HTML>
    	<HEAD>
    	<TITLE>Nettoyage PC</TITLE>
        <HTA:Application
    Caption = Yes
    Icon = "Cleanmgr.exe"
    ShowInTaskBar = Yes
    SingleInstance = Yes
    MinimizeButton = Yes
    Border = Thick
    SCROLL="NO">
    </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 Titre
    				Titre = "Nettoyage PC"
    'Fenetre Windows
    				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
    'Position Windows	
    				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
     
    'Nettoyage de disque 			
     
    				SUB Nettoi()
    				Self.document.title = Titre
    				CALL InnerWindowSize(401,402)
    				ONSCR.InnerHTML="<TABLE HEIGHT=""200"" WIDTH=""399"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#000000"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<TR BGCOLOR=""#346E99""><TD COLSPAN=""2""><CENTER><FONT COLOR=""#FFFFFF"" SIZE=""+2"" FACE=""VERDANA,ARIAL,HELVETICA,SANS-SERIF""><marquee>Nettoyage PC Beta1</marquee></FONT></CENTER></TD></TR></TABLE>"_
    				&"<TABLE WIDTH=""400"" HEIGHT=""200"" BORDER=""1"" BGCOLOR=""#000000"" BORDERCOLOR=""#FFFFFF"" CELLPADDING=""0"" CELLSPACING=""1"">"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Etiquette de poste :</FONT> <FONT COLOR=""Red"">"& GetComputerName &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Nom d'utilisateur :</FONT> <FONT COLOR=""Red"">"& nomuser &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Espace Disque Disponible :</FONT> <FONT COLOR=""Red"">"& diskspace &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><FONT COLOR=""Red""> Espace Disque Total :</FONT> <FONT COLOR=""Red"">"& disksize &"</FONT></td></tr>"_
    				&"<tr><td align=""center""><INPUT TYPE=""button"" STYLE=""HEIGHT:25;WIDTH:165"" NAME=""LogiBor"" VALUE=""Lancer le Nettoyage"" onClick=""Netto()""</td></tr>"_
    				&"</TABLE>"
    				END SUB
     
    'Demander le nom d'utilisateur				
    				Dim nomuser
    				nomuser = InputBox("Exemple : P.NOM", "Nom d'utilisateur?", "")
    'Espace disque disponible
    				Dim fs, nomdisk, diskspace, disksize
    				Set fs = CreateObject ("Scripting.FileSystemObject")
    				Set nomdisk = fs.GetDrive(fs.GetDriveName("C:\"))
    				diskspace = FormatNumber(nomdisk.FreeSpace/1073741824, 0) & " Go libres"
    				disksize = FormatNumber(nomdisk.TotalSize/1073741824, 0) & " Go"
    'Nom PC
    				Function GetComputerName()
    				Dim objNetwork
    				Set objNetwork = CreateObject("WScript.Network")
    				GetComputerName = objNetwork.ComputerName
    				End Function
    'Programe Nettoyage
    				Sub Netto()
    				Dim Ws
    				Set WS = CreateObject("WScript.shell")
    				Dim messagebox
    				messagebox = MsgBox ("Merci d'enregistrer votre travail, tous les programmes seront fermés ! Continuer?", vbYesNo + vbCritical, "TITRE")
    				if messagebox = vbNo then
    					Unload Me
    				end if
    				WS.run "cmd.exe /c Taskkill /f /im iexplore.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im outlook.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im winword.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im excel.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im searchindexer.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im searchprotocolhost.exe",0, True
    				WS.run "cmd.exe /c taskkill /f /im UcMapi.exe",0, True
    				Msgbox "Les processus Internet Explorer, Outlook, Word, Excel et Windows Search ont été quittés",64,Titre
    				WS.run "powercfg -h off",0, True
    				WS.run "cmd.exe /c del /s /q C:\MSOCACHE\*.*",0, True
    				WS.run "Rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 8",0, True
    				WS.run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2",0, True
    				WS.run "cmd.exe /c del /s /q C:\Users\" & nomuser & "\*.tmp",0, True
    				WS.run "cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\*.tmp",0, True
    				WS.run "cmd.exe /c del /s /q c:\windows\*.tmp",0, True
    				WS.run "vssadmin delete shadows /all /quiet"
    				WS.run "vssadmin resize shadowstorage /For=c: /On=c: /MaxSize=500MB"
    				WS.run "cmd.exe /c del /s /q c:\windows\*.dmp",0, True
    				WS.run "cmd.exe /c del /s /q c:\windows\temp\*.*",0, True
    				WS.run "cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\microsoft\outlook\*.old",0, True
    				WS.run "cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\microsoft\outlook\*.bak",0, True
    				WS.run "cmd.exe /c del /s /q C:\Users\" & nomuser & "\Appdata\Local\microsoft\outlook\*.bak",0, True
    				WS.run "cmd.exe /c del /s /q c:\windows\temp\*.log",0, True
    				Msgbox "Nettoyage terminé !",64,Titre
    				end sub
    				call Nettoi()
    	</script>

  17. #17
    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

  18. #18
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut
    tout simplement

    Super, au moins ça ferme sans erreur.. Par contre ca ferme le programme

    Je suis chiant je sais il faudrait que la fenetre de message se ferme, sans pour autant quitter tout le programme, c'est possible? (plus compliqué je pense)

  19. #19
    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 skymike03 Voir le message
    il faudrait que la fenetre de message se ferme, sans pour autant quitter tout le programme, c'est possible ?
    Oui

  20. #20
    Futur Membre du Club
    Homme Profil pro
    Technicien Help Desk
    Inscrit en
    Septembre 2012
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 31
    Localisation : France

    Informations professionnelles :
    Activité : Technicien Help Desk
    Secteur : Bâtiment Travaux Publics

    Informations forums :
    Inscription : Septembre 2012
    Messages : 11
    Points : 8
    Points
    8
    Par défaut
    Parfait Mehdi !!

Discussions similaires

  1. Executer un script batch depuis un DTS package
    Par Nadaa dans le forum MS SQL Server
    Réponses: 6
    Dernier message: 29/03/2006, 09h14
  2. (Batch et VBS) Petit probléme avec un script batch VBS
    Par Edoxituz dans le forum Windows
    Réponses: 11
    Dernier message: 27/02/2006, 17h21
  3. Récupérer les variables d'un script batch
    Par programaniac dans le forum Langage
    Réponses: 1
    Dernier message: 21/02/2006, 17h55
  4. Convertir un script php en asp
    Par tibow dans le forum ASP
    Réponses: 3
    Dernier message: 20/11/2005, 02h14
  5. Réponses: 7
    Dernier message: 15/03/2005, 14h44

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