Voila un petit programme batch combiné avec la commande msgbox de Vbscript.

Voila le code :
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
==================================================
:: \\Rénitialisation des variables
set Title_= &set message_= &Set Commu_= 
set Exec=%~4
Set Commu_=%~3
Set Title_=%~2
Set Message_=%~1
::\\Suppression de fichier VBS
Set Vbs_=%TEMP%\LogVBS.vbs &if exist %vbs_% del %vbs_%

::\\Les jeus de condition du programme.
if /i {%~1}=={} goto :Help_ 
if /I {%~1}=={} if /I {%~2}=={} Goto :erreur_
if /I defined Message_ if /I {%~2}=={-o} Set Title_=Qbox &Goto :No_error
if /I defined Message_ (
		if /I defined Title_ (if /I {%~3}=={-o} (goto :No_error))
		if /I {%~2}=={} if  /I {%~3}=={} if /I {%~4}=={} (Set Exec=&goto :No_error) 
		if /I {%~2}=={} (Set Commu_=%~2 &set Exec=%~3 &goto :No_error)					
		)
::\\La création des fichiers vbs.
:No_error
If {%~2}=={} Set Title_=Qbox
Echo.Dim Q							    >>%Vbs_%  
echo.					  			    >>%Vbs_%    							
Echo.Set Shell = WScript.CreateObject("WScript.Shell")              >>%Vbs_%
Echo Q=msgbox("%Message_%",4,"%Title_%") 			    >>%Vbs_%

	If Defined Commu_ (
	       if defined Exec (
			Echo.If Q=6 then Shell.Run "%Exec%"    	   >>%Vbs_%
		)
	)
::\\L'execution de fichier VBS. 
%Vbs_%
=================================================
L'execution de ce programme est expliqué comme suit :
Qbox.bat "Le contenu du message" "le contenu du titre" -o "La commande"
par ex :
C:\>Qbox "Bonjour" "Information" -o "notepad.exe"

La combinasion entre Dos et Vbscript est une bonne chose n'est ce pas