1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| <HTML>
<HEAD>
<title>Execution des programmes</title>
<HTA:APPLICATION ID="Execution des programmes"
APPLICATIONNAME="Execution des programmes"
CAPTION="yes"
SHOWINTASKBAR="no"
SINGLEINSTANCE="yes"
SYSMENU="yes"
SCROLL="no"
WINDOWSTATE="normal">
<style>
body{
background-color: lightblue;
}
label,.btn{
font-weight: bold;
}
</style>
<SCRIPT TYPE="text/Vbscript">
Sub Window_OnLoad
CenterWindow 450,350
End Sub
Sub StartTimer
MonTimer0 =window.setTimeOut ("welcome", 1000, "VBScript")
MonTimer1 = window.setTimeOut ("Start01", 5000, "VBScript")
End sub
Sub Welcome
MsgBox "Vos applications vont se lancer dans un instant... Veuillez patienter...",64,"Vos applications vont se lancer dans un instant... Veuillez patienter..."
End Sub
Sub CenterWindow(x,y)
window.resizeTo x, y
iLeft = window.screen.availWidth/2 - x/2
itop = window.screen.availHeight/2 - y/2
window.moveTo ileft, itop
End Sub
Sub Start01
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
CheminNomFichier = "command.txt"
If Not fso.FileExists(CheminNomFichier) Then
MsgBox "le Fichier "&CheminNomFichier&" est Introuvable",16,"Attention !!!"
window.close()
End if
Set LeFichier = fso.OpenTextFile(CheminNomFichier,1)
PourTbl = LeFichier.ReadAll
LeFichier.Close
TblLigne = Split(PourTbl,vbCrLf)
For i=LBound(TblLigne) To UBound(TblLigne)
Executer TblLigne(i)
Next
Call Startend
End Sub
Function Executer(command)
Set ws = CreateObject("wscript.Shell")
ws.Run Command,0,True
End Function
Sub Startend
MsgBox "Toutes les applications ont été correctement lancées !",64,"Toutes les applications ont été correctement lancées !"
window.close()
End Sub
</SCRIPT>
</HEAD>
<BODY>
<center><INPUT TYPE="button" onclick="StartTimer" VALUE="Executer Les programmes">
</BODY>
</HTML> |