Guest User

Untitled

a guest
Oct 10th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. option explicit
  2.  
  3. Dim sh
  4. set sh = CreateObject("WScript.Shell")
  5. if sh is nothing then
  6.     msgbox "Klasse ""WScript.Shell"" nicht installiert" & vbcr & "(WSH-Basisklasse erforderlich)",16,"Fehler"
  7.     Wscript.Quit
  8. end if
  9.  
  10.  
  11. if instr(lcase(wscript.fullname),"cscript") = 0 then
  12.     sh.Run """" & sh.ExpandEnvironmentStrings("%WinDir%") & "\System32\cscript.exe"" """ & WScript.ScriptFullName & """"
  13.    
  14.     set sh = Nothing
  15.     wscript.quit
  16. end if
  17. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  18.  
  19. dim fs
  20. dim runCount
  21. dim swrcPath
  22.  
  23. Set fs = CreateObject("Scripting.FileSystemObject")
  24. if fs is nothing then
  25.     msgbox "Klasse ""Scripting.FileSystemObject"" nicht installiert",16,"Fehler"
  26.     Wscript.Quit
  27. end if
  28.  
  29. swrcPath = left(WScript.ScriptFullName,instrrev(WScript.ScriptFullName,"\"))
  30.  
  31. runCount = 1
  32.  
  33. do
  34.     Out "##################################################################"
  35.     Out "#                                                                #"
  36.     Out "#                      StartScript für DM                        #"
  37.     Out "#           Bitte dieses Fenster nicht schliessen                #"
  38.     Out "#                    (" & runCount & " mal bereit gestartet)     #"
  39.     Out "#                                                                #"
  40.     Out "##################################################################"
  41.    
  42.     wscript.stdout.WriteBlankLines 16
  43.    
  44.     sh.run """" & swrcPath & "SWRepublicCommando.exe"" DM_Engine?Name=hife?Game=MPGame.DMGame?GoalScore=0?TimeLimit=30?RespawnDelay=0?" _
  45.                 & "RoundTime=0?MaxPlayers=3?GameSpeed=1.0?FF=0.00?WeaponStay=False?BalanceTeams=True?DedicatedServer=True?" _
  46.                 & "ReservedSlots=0?GameStats=False?GamePassword=" _
  47.                 & " -ini=server_3.ini -server -nolog" _
  48.                 , 1, True
  49.    
  50.     'fs.CopyFile swrcPath & "server.log", swrcPath & "server_crash.log", true
  51.     runCount = runCount + 1
  52. loop
  53.  
  54. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  55. function Out(text)
  56.     wscript.stdout.WriteLine text
  57. end function
Add Comment
Please, Sign In to add comment