Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- option explicit
- Dim sh
- set sh = CreateObject("WScript.Shell")
- if sh is nothing then
- msgbox "Klasse ""WScript.Shell"" nicht installiert" & vbcr & "(WSH-Basisklasse erforderlich)",16,"Fehler"
- Wscript.Quit
- end if
- if instr(lcase(wscript.fullname),"cscript") = 0 then
- sh.Run """" & sh.ExpandEnvironmentStrings("%WinDir%") & "\System32\cscript.exe"" """ & WScript.ScriptFullName & """"
- set sh = Nothing
- wscript.quit
- end if
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- dim fs
- dim runCount
- dim swrcPath
- Set fs = CreateObject("Scripting.FileSystemObject")
- if fs is nothing then
- msgbox "Klasse ""Scripting.FileSystemObject"" nicht installiert",16,"Fehler"
- Wscript.Quit
- end if
- swrcPath = left(WScript.ScriptFullName,instrrev(WScript.ScriptFullName,"\"))
- runCount = 1
- do
- Out "##################################################################"
- Out "# #"
- Out "# StartScript für DM #"
- Out "# Bitte dieses Fenster nicht schliessen #"
- Out "# (" & runCount & " mal bereit gestartet) #"
- Out "# #"
- Out "##################################################################"
- wscript.stdout.WriteBlankLines 16
- sh.run """" & swrcPath & "SWRepublicCommando.exe"" DM_Engine?Name=hife?Game=MPGame.DMGame?GoalScore=0?TimeLimit=30?RespawnDelay=0?" _
- & "RoundTime=0?MaxPlayers=3?GameSpeed=1.0?FF=0.00?WeaponStay=False?BalanceTeams=True?DedicatedServer=True?" _
- & "ReservedSlots=0?GameStats=False?GamePassword=" _
- & " -ini=server_3.ini -server -nolog" _
- , 1, True
- 'fs.CopyFile swrcPath & "server.log", swrcPath & "server_crash.log", true
- runCount = runCount + 1
- loop
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- function Out(text)
- wscript.stdout.WriteLine text
- end function
Add Comment
Please, Sign In to add comment