Bonjour,

Donc j'ai écris plusieurs fonctions.

Celle qui utilise un seul argument fonctionne, mais j'en ai une autre, qui utilise deux argument qui ne fonctionne pas.

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
' Chemin du script de configuration
ScriptPath = Left(WScript.ScriptFullName,(Len(WScript.ScriptFullName) - (Len(WScript.ScriptName) + 1)))
 
' Dim commande
function exec_commande(byval commande)
	Set WshShell = WScript.CreateObject("WScript.Shell")
	Return = WshShell.Run(commande, 0, true)
end function
 
' Dim fichier_source, fichier_destination
function copy_files(byval fichier_source, byval fichier_destination)
	wscript.echo fichier_source
	wscript.echo fichier_destination
	' Mettre à jours les chemins d'installation
	Dim oFSO
	Set oFSO = CreateObject("Scripting.FileSystemObject")
	oFSO.CopyFile fichier_source, fichier_destination,True
end function
 
exec_commande(ScriptPath & "\apache\bin\httpd.exe -k install")
exec_commande(ScriptPath & "\mysql\bin\mysqld-nt --install")
copy_files("apache\conf\httpd.conf.install","apache\conf\httpd.conf")
J'ai comme erreur "Cannot use parentheses when calling a Sub" ligne 24, char 74.

Je n'arrive pas à corriger le problème.

Merci d'avance.

Arnaud