Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
d1f96fc0cddb68e18c5d34346d4b44203495216d
[simgrid.git] / examples / gras / mutual_exclusion / simple_token / test_rl.vbs
1 Dim oShell
2 Dim iExitCode
3
4 Set oShell = WScript.CreateObject ("WSCript.shell")
5         
6 iExitCode = oShell.run("cmd /K " & GetCurrentDirectory() & "bin\simple_token_node  4000 127.0.0.1 4010 --create-token",1,False)
7 iExitCode = oShell.run("cmd /K " & GetCurrentDirectory() & "bin\simple_token_node 4010 127.0.0.1 4020",1,False)
8 iExitCode = oShell.run("cmd /K " & GetCurrentDirectory() & "bin\simple_token_node 4020 127.0.0.1 4030",1,False)
9 iExitCode = oShell.run("cmd /K " & GetCurrentDirectory() & "bin\simple_token_node 4030 127.0.0.1 4040",1,False)
10 iExitCode = oShell.run("cmd /K " & GetCurrentDirectory() & "bin\simple_token_node 4040 127.0.0.1 4050",1,False)
11 iExitCode = oShell.run("cmd /K " & GetCurrentDirectory() & "bin\simple_token_node 4050 127.0.0.1 4000",1,False)
12
13 Set oShell = Nothing
14
15 'This function returns the current directory of the script 
16 Function GetCurrentDirectory()
17         
18         Dim sScriptFullName 
19         
20         sScriptFullName = WScript.ScriptFullName
21         GetCurrentDirectory = mid(sScriptFullName,1,InStrRev(sScriptFullName,"\"))
22         
23 End Function