Sub test()
Dim x&, codevbs$, vbsfile$
vbsfile = ThisWorkbook.Path & "\destructeur.vbs"
codevbs = "fself = WScript.ScriptFullName" & vbCrLf
'codevbs = codevbs & "msgbox wscript.arguments.Count" & vbCrLf
codevbs = codevbs & "msgbox ""lancement N° "" & WScript.Arguments(0)" & vbCrLf
codevbs = codevbs & "if WScript.Arguments(0) = 10 then" & vbCrLf
codevbs = codevbs & "Set objFSO = CreateObject(""Scripting.FileSystemObject"")" & vbCrLf
codevbs = codevbs & "objFSO.deletefile fself" & vbCrLf
codevbs = codevbs & "end if" & vbCrLf
x = FreeFile
Open vbsfile For Output As #x: Print #x, codevbs: Close #x
For i = 1 To 10
Set oWsh = CreateObject("Shell.Application")
oWsh.ShellExecute vbsfile, i
Next
End Sub