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
| <html>
<head>
<HTA:APPLICATION
APPLICATIONNAME="How to pass command line by Hackoo"
BORDER="THIN"
BORDERSTYLE="NORMAL"
ICON="Explorer.exe"
INNERBORDER="NO"
MAXIMIZEBUTTON="NO"
MINIMIZEBUTTON="yes"
SCROLL="yes"
SELECTION="NO"
sysmenu="yes"
SINGLEINSTANCE="YES"/>
<title> Boite a outils !! </title>
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="text/html; charset=windows-1252">
<BODY TOPMARGIN="1" LEFTMARGIN="1"><CENTER><DIV><SPAN ID="ONSCR"></SPAN></DIV></CENTER></BODY>
<SCRIPT LANGUAGE="VBScript">
'*****************************************************************************
Option Explicit
Dim WS,MyCmd,Resultat
Set WS = CreateObject("WScript.shell")
Function Executer(StrCmd,Console)
'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 450,650
End Sub
'*****************************************************************************
Sub CP_OnKeyPress()
If (window.event.keyCode) = 13 Then OK_OnClick
End Sub
'*****************************************************************************
Sub OK_OnClick()
If Not IsNumeric(cp.value) Then
MsgBox "Entrée non valide"
Exit Sub
End If
Dim WSH
Set WSH = CreateObject("Wscript.shell")
Set WSH = nothing
MsgBox "MAJ du Script OK!"
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.Demarrage du service iMQ & sc start iMQ >>Tmplog.txt",0)
End Sub
'*****************************************************************************
Sub Stop_iMQ()
Call Executer("echo.Arret du service iMQ & sc stop iMQ >>Tmplog.txt",0)
End Sub
'*****************************************************************************
Sub Run(var)
Select Case var
Case 1 WS.run("services.msc")
Case 2 WS.run("Taskschd.msc")
Case 3 WS.run("Explorer.exe ::{20d04fe0-3aea-1069-a2d8-08002b30309d}")'Poste de Travail
Case 4 WS.run("CONTROL.EXE")
End select
End Sub
'*****************************************************************************
Sub Tache_Check()
Call Executer("echo.Etat ****** & schtasks /query /TN ****** >>log.txt & start log.txt",0)
End Sub
'*****************************************************************************
Sub Tache_ON()
Call Executer("echo.Activation ****** & schtasks /change /TN ****** /enable >>log.txt",0)
End Sub
'*****************************************************************************
Sub Tache_OFF()
Call Executer("echo.Desactivation ****** & schtasks /change /TN ****** /disable >>log.txt",0)
End Sub
'*****************************************************************************
Sub Tache_RUN()
Call Executer("echo.Execution ****** & schtasks /run /TN ****** >>log.txt",0)
End Sub
'*****************************************************************************
Sub Copie_Temp()
Call Executer("echo.Creation migration_H & cp.value & & md c:\temp\migration_H & cp.value & /y >>log.txt",1)
Call Executer("echo.Export cle ******t & reg export HKLM\SOFTWARE\****** c:\temp\migration_H & cp.value & \cle ******.txt /y >>log.txt",1)
Call Executer("echo.Export cle ****** & reg export HKLM\SOFTWARE\****** c:\temp\migration_H & cp.value & \cle ******.txt /y >>log.txt",1)
Call Executer("echo.Export ****** & xcopy c:\****** /e /s c:\temp\migration_H & cp.value & \ /y >>log.txt",1)
End Sub
'*****************************************************************************
Sub Copie_Axis()
Call Executer("echo.Export ******.zip & xcopy c:\******.zip c:\temp\migration_H & cp.value &\ /E /S /y >>log.txt",1)
Call Executer("echo.Export ******.txt & xcopy c:\******.txt c:\temp\migration_H & cp.value &\ /E /S /y >>log.txt",1)
Call Executer("echo.Export ****** & xcopy C:\****** /e /s c:\temp\migration_H & cp.value &\ /y >>log.txt",1)
Call Executer("echo.Export ****** & xcopy C:\****** /e /s c:\temp\migration_H & cp.value &\ /y >>log.txt",1)
Call Executer("echo.Export ****** & xcopy C:\****** /E /S c:\temp\migration_H & cp.value &\ /y >>log.txt",1)
End Sub
'*****************************************************************************
Sub Copie_USB()
Call Executer("echo.Export sur cle USB.zip & xcopy c:\temp\migration_H & cp.value & D:\migration_H & cp.value &\ /E /S /y >>log.txt",0)
End Sub
'*****************************************************************************
</script>
</head>
<BODY text=white bgcolor="DarkOrange" TOPMARGIN="1" LEFTMARGIN="1">
<b> Saisir votre code </b>
<INPUT Type="text" id= "CP" name="CP" & cp.value &= & cp.value & size=4 maxlength=4 style="Color:blue ">
<INPUT Type="button" id= "OK" name="OK" value="MAJ du Script" >
'************************************************
<center><b>Services : </b><br>
<button onclick="Call Check_Services()">Check Services</button><br>
<button onclick="Call Stop_Services()">Stop et Kill Services</button>
<button onclick="Call Start_Services()">Start et Run Services</button><br>
<button onclick="Call Stop_iMQ()">Stop et kill ***</button>
<button onclick="Call Start_iMQ()">Start et run ***</button><br>
<button onclick="Run(1)">Gestion services</button></center>
'************************************************
<center><b>Tache planifiee : </b><br>
<button onclick="Call Tache_Check()">Check Tache</button><br>
<button onclick="Call Tache_OFF()">Stop Tache</button>
<button onclick="Call Tache_ON()">Start Tache</button><br>
<button onclick="Call Tache_RUN()">Run Tache</button><br>
<button onclick="Run(2)">Planificateur de Taches</button><br></center>
'************************************************
<center><b>Gestion fichiers : </b><br>
<button onclick="Call Copie_Temp()">Creation dossier migration</button>
<button onclick="Call Copie_Axis()">Copie fichiers paiement<br></button>
<button onclick="Call Copie_USB()">Copie sur cle USB<br></button>
<button onclick="Run(3)">Poste de travail</button><br></center>
'************************************************
<center><b>Outils</b><br>
<button onclick="Run(3)">Poste de travail</button><br>
<button onclick="Run(4)">Notepad</button><br>
<button onclick="Run(5)">Panneau de config</button><br></center>
'************************************************
</body>
</html> |
Partager