SRCDS Steam group


Automatically updating Windows SRCDS Server!!!
#1
Hi all

Thought I would share with you the script I wrote for running an automatically updating windows srcds server. As you know -autoupdate does nothing on a windows box and every time a source update comes out you have to manually update your servers which can be annoying should the admin who can VNC in is not around.

The following is a modification of what is in the tutorials here at srcds.com (http://www.srcds.com/?knowledge)

This script also launches srcdsfpsboost.exe to ensure you have the best possibly FPS on your server. I have also attached this program to the thread.

To run this script create a new txt file and call it Runserver.bat and then simply double click. Instructions on how to configure the script are in the code below.

Code:
@echo off
cls
rem  =====================================================
rem |FoRcEFiRe's Windows SRCDS Auto updating server script|
rem  -----------------------------------------------------
rem |This script will allow you to run a windows SRCDS    |
rem |server which automatically updates itself everytime  |
rem |you start or reboot it.                              |
rem |This was needed because -autoupdate does not work    |
rem |on the windows platform.                             |
rem |hldsupdatetool.exe needs to be installed to the      |
rem |default location (c:\program files\Valve\HLserver\)  |
rem |You also need to change the DIR in this script and   |
rem |point it to where you CSS server is located          |
rem |(Currently C:\!CHANGETHIS!\)                         |
rem |srcdsfpsboost.exe should also be in the root of your |
rem |server directory to ensure you get maximum FPS       |
rem |-----------------------------------------------------|
rem |Please leave this script intact, you can contact me  |
rem |on srcds.com's forums (where this was orignally      |
rem |posted)                                              |
rem  =====================================================

rem BELOW COMMAND STARTS THE SRCDSFPSBOOST.EXE PROGRAM THAT YOU SHOULD ALREADY HAVE, REMOVE IF YOU DONT PLAN ON RUNNING THIS.
echo (%time%) Starting FPS Boost Program
start /MIN C:\!CHANGETHIS!\srcdsfpsboost.exe
echo (%time%) Started FPS Boost successfully

rem NOW WE BEGING THE UPDATE AND SRCDS PROGRAMS
echo Protecting srcds from crashes...
title srcds.com Watchdog for CSS Server - FoRcEFiRe 2007
:srcds

echo (%time%) Change dir so we can run the update tool properly!
cd c:\Program Files\Valve\HLserver\
echo (%time%) Changed DIR with no problems, now run the update tool
start /wait hldsupdatetool.exe -command update -game "Counter-Strike Source" -dir "C:\!CHANGETHIS!"
echo (%time%) UPDATING DONE! Now start the server

echo (%time%) CSS starting in a minised window.
start /wait /High /MIN C:\!CHANGETHIS!\srcds.exe -console -game cstrike +map de_dust2 +ip XXX.XXX.XXX.XXX +maxplayers XX -tickrate XXX +fps_max 600
echo (%time%) WARNING: srcds closed or crashed, restarting.
echo -----------------------------------------------------
goto srcds

Now all you GISP's and admins can update your servers automatically on windows every time they are started/restarted.

Hope this is useful to people, happy gaming! Big Grin

FoRcEFiRe

http://forum.gamecommunity.co.uk


Attached Files
.zip   srcdsfpsboost.zip (Size: 15.53 KB / Downloads: 410)
Reply
#2
Nice, I like it.
Reply
#3
wow 221 views and only one thanks (thanks for that btw) Sad

any improvements i should make to this?
Reply
#4
Thanks man, this is great.
realchamp Wrote:
Hazz Wrote:Has someone helped you on these forums? If so, help someone else
Mooga Wrote:OrangeBox is a WHORE.
Reply
#5
Nice - My wish list currently is something that will:
a) detect if the server is empty in the middle of the night
b) shut down srcds
c) install windows updates
d) reboot
e) update srcds
f) restart my server

If I ever get around to making it work, I'll post it
Reply
#6
All that does is update before it boots... What we need is something to detect the "love note," shut off the server, update, and reboot it.
~ Mooga ...w00t? - SRCDS.com on Twitter
[Image: 76561197965445574.png]
Please do not PM me for server related help
fqdn Wrote:if you've seen the any of the matrix movies, a game server is not all that different. it runs a version of the game that handles the entire world for each client connected. that's the 2 sentence explanation.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)