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
| <html>
<style>
body {background-color: #646B6A; background-repeat: repeat-y;background-position: left top;}
<TR BGCOLOR=""#CDE5E2""><TD COLSPAN=""2""><CENTER><FONT COLOR=""#CDE5E2"" SIZE=""+2"" FACE=""VERDANA,ARIAL,HELVETICA,SANS-SERIF""></FONT></CENTER></TD></TR></TABLE>"
</style>
<head>
<HTA:APPLICATION ICON="images/9088.ico" MAXIMIZEBUTTON="NO" NAVIGABLE="No" SCROLL="NO">
<title>OUTILS</title>
<HTA:APPLICATION
ID="Personalisation"
APPLICATIONNAME="Personalisation"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="normal"
CAPTION="yes"
></head>
<SCRIPT Language="VBScript">
ON ERROR RESUME NEXT
Const ForReading = 1
Const FichierINI = "Outils\Config.ini"
Dim FSO, oFich, ContenuFichierIni, objShell
Set FSO = CreateObject("Scripting.FileSystemObject")
Set oFich = FSO.OpenTextFile(FichierINI, ForReading)
ContenuFichierIni = oFich.ReadAll
oFich.Close
Set FSO = Nothing
'Msgbox FindParams("Target")
Dim C1, C2, C3
C1 = FindParams("Chem1", ContenuFichierIni)
C2 = FindParams("Serveur", ContenuFichierIni)
C3 = FindParams("Logon", ContenuFichierIni)
'==================== Fonction de recherche : ========
Function FindParams(BaliseRechercher, Dans)
Dim PosDeb, PosFin
PosDeb = InStr(1, Trim(LCase(Dans)), LCase(BaliseRechercher), vbTextCompare)
If PosDeb <> 0 Then
PosDeb = PosDeb + Len(BaliseRechercher) + 3 ' " = "
PosFin = InStr(PosDeb, Dans, vbNewLine, vbTextCompare) - 2
If PosFin = 0 Then
PosFin = Len(Dans)
Else
PosFin = PosFin + 1
End If
FindParams = Mid(Dans, PosDeb, (PosFin - PosDeb) + 1)
End If
End Function
Sub Window_Onload
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
For Each objItem in colItems
intHorizontal = objItem.ScreenWidth
intVertical = objItem.ScreenHeight
Next
XPos = 350
YPos = 200
intLeft = (intHorizontal - XPos) / 2
intTop = (intVertical - YPos) / 2
self.ResizeTo Xpos,YPos
End Sub
Sub Action1
Set objShell = CreateObject("Wscript.Shell")
objShell.Run C1 & "nommach.vbs"
End Sub
Sub Action2
Set objShell = CreateObject("Wscript.Shell")
objShell.Run C1 & "ip.vbs"
End Sub
Sub Action3
Set objShell = CreateObject("Wscript.Shell")
objShell.Run C2 & C3
End Sub
Sub Action4
Rep = MsgBox ("Etes vous sûr(e) de vouloir quitter ?", vbQuestion Or vbOkCancel, "Fermeture de l'application")
if Rep = vbOk then
self.Close()
else
End If
End Sub
Sub Action5
self.Close()
End Sub
Sub Help1
Msgbox "UN PEU D'AIDE .... " & vbCrLf _
& "" & vbCrLf _
& "NOM DE MACHINE :" & vbCrLf _
& "En cliquant sur ce bouton vous obtiendrez le nom de la machine" & vbCrLf _
& "sur laquelle vous travaillez afin de le fournir à l'informaticien" & vbCrLf _
& "qui vous l'a demandé. " & vbCrLf _
& "" ,32
End Sub
Sub Help2
Msgbox "UN PEU D'AIDE .... " & vbCrLf _
& "" & vbCrLf _
& "ADRESSE IP :" & vbCrLf _
& "En cliquant sur ce bouton vous obtiendrez l'adresse IP de la machine" & vbCrLf _
& "sur laquelle vous travaillez afin de la fournir à la demande de l'informaticien." & vbCrLf _
& "" ,32
End Sub
Sub Help3
Msgbox "UN PEU D'AIDE .... " & vbCrLf _
& "" & vbCrLf _
& "Mise à jour :" & vbCrLf _
& "Relancer le script de démarrage" & vbCrLf _
& "" ,32
End Sub
</SCRIPT>
<body>
<div STYLE="color:blue" valign="center" ><b>Faites votre choix : </b> </div>
<hr>
<input id=Button9 class="button" TITLE="Trouver votre nom de machine ..." type="button" value=" Trouver votre nom de machine " name="Groups_Button" onClick="Action1">
<img src="images/hlp.gif" alt="Un peu d'aide ?" width="12" height="12" onClick="Help1">
<input id=Button1 class="button" TITLE="Trouver votre adresse IP..." type="button" value=" Trouver votre adresse IP " name="Groups_Button" onClick="Action2">
<img src="images/hlp.gif" alt="Un peu d'aide ?" width="12" height="12" onClick="Help2">
<input id=Button2 class="button" TITLE="Relancer le script de démarrage ..." type="button" value=" Trouver les mises à Jour " name="Groups_Button" onClick="Action3">
<img src="images/hlp.gif" alt="Un peu d'aide ?" width="12" height="12" onClick="Help3">
<input id=Button5 class="button" TITLE="Quitter l'application ..." type="button" value=" Quitter " name="Groups_Button" onClick="Action5">
</b>
</body>
</html> |