Raised This Month: $ Target: $400
 0% 

How to get -autoupdate on Windows


Post New Thread Reply   
 
Thread Tools Display Modes
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-07-2011 , 22:06   Re: How to get -autoupdate on Windows
Reply With Quote #11

Quote:
Originally Posted by Dr. McKay View Post
Something funny with the start /wait command is, the file path can't have any spaces in it whatsoever, nor can it be enclosed in quotes. If you absolutely cannot rename your folder, you can use sysinternals junction.exe or 7's built-in symlink creator.
mklink /j is your friend. I recently used it to move my Steam common folder (for non-FPS, non-Valve games) from my SSD to my standard hard drive in preparation for SWTOR's giganticness.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Larsen
Senior Member
Join Date: Oct 2011
Old 12-08-2011 , 17:08   Re: How to get -autoupdate on Windows
Reply With Quote #12

Okay gents, I think I got it working for our other server (no spaces in the path):

Quote:
@echo off
title SRCDS Watchdog/Updater
cls
echo (%date% %time%) Now starting SRCDS Watchdog/Updater
echo (%date% %time%) Now starting SRCDS Watchdog/Updater >> watchdog.log
:begin
echo (%date% %time%) Checking for SRCDS updates
echo (%date% %time%) Checking for SRCDS updates >> watchdog.log
start /wait F:\srcds\hldsupdatetool.exe -command update -game dods -dir F:\realism -verify_all
echo (%date% %time%) Starting server
echo (%date% %time%) Starting server >> watchdog.log
start /wait F:\realism\orangebox\Realism2.1.exe.lnk
echo (%date% %time%) WARNING: SRCDS quit or crashed, restarting
echo (%date% %time%) WARNING: SRCDS quit or crashed, restarting >> watchdog.log
goto begin
So, I'm starting a shortcut to a cmd.exe with my command line already appended. It seems to run the update, and checks, then it successfully starts my server, except the update runs again, and starts a new instance of the server. So, I'm getting multiple servers started after 15 seconds, and I only want the one.

Any idea why it's spamming multiple servers?
__________________

Larsen is offline
Larsen
Senior Member
Join Date: Oct 2011
Old 12-08-2011 , 17:20   Re: How to get -autoupdate on Windows
Reply With Quote #13

Okay, so I got it all set and working (it doesn't like shortcuts, I had to actually use the srcds.exe path as you said in original post).

But now, I don't know where to define start /high and /affinity 1. (high priority, one core) I tried both the batch file and the shortcut to it on the desktop
__________________

Larsen is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 12-08-2011 , 17:47   Re: How to get -autoupdate on Windows
Reply With Quote #14

Quote:
Originally Posted by Larsen View Post
Okay, so I got it all set and working (it doesn't like shortcuts, I had to actually use the srcds.exe path as you said in original post).

But now, I don't know where to define start /high and /affinity 1. (high priority, one core) I tried both the batch file and the shortcut to it on the desktop
start /high /affinity 1 /wait C:\Path\To\srcds.exe -console ...
__________________
Dr. McKay is offline
Larsen
Senior Member
Join Date: Oct 2011
Old 12-08-2011 , 18:49   Re: How to get -autoupdate on Windows
Reply With Quote #15

Beautiful, thank you. I was putting it after wait. Now my shit starts when I double-click the batch and I set it and forget it
__________________

Larsen is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-08-2011 , 20:00   Re: How to get -autoupdate on Windows
Reply With Quote #16

As a side note, nemrun is something like this for Linux... because -autoupdate only works if people are on your server when the update hits.

Side note: nemrun was recently updated to 1.8.5, and previous versions will start to fail soon because of an API change made on the Steam backend.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 12-08-2011 , 21:56   Re: How to get -autoupdate on Windows
Reply With Quote #17

Quote:
Originally Posted by Powerlord View Post
As a side note, nemrun is something like this for Linux... because -autoupdate only works if people are on your server when the update hits.

Side note: nemrun was recently updated to 1.8.5, and previous versions will start to fail soon because of an API change made on the Steam backend.
?

Why not just use my auto steam update plugin on Linux?
__________________
Dr. McKay is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-09-2011 , 10:41   Re: How to get -autoupdate on Windows
Reply With Quote #18

Quote:
Originally Posted by Dr. McKay View Post
?

Why not just use my auto steam update plugin on Linux?
I have multiple servers running on the same box. nemrun updates my server files, then restarts all my servers.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
C0nw0nk
Senior Member
Join Date: May 2011
Location: United Kingdom
Old 02-29-2012 , 21:44   Re: How to get -autoupdate on Windows
Reply With Quote #19

Thanks for the batch file and this can anyone confirm if it truely works with the plugin on windows machines ?


EDIT : (Does not work the plugin just restarts the server over and over again and the batch file only prevents it from crashing it does not force the server to goto the update.)

Last edited by C0nw0nk; 03-02-2012 at 09:24.
C0nw0nk is offline
Send a message via MSN to C0nw0nk
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 03-17-2012 , 05:41   Re: How to get -autoupdate on Windows
Reply With Quote #20

Quote:
Originally Posted by C0nw0nk View Post
Thanks for the batch file and this can anyone confirm if it truely works with the plugin on windows machines ?


EDIT : (Does not work the plugin just restarts the server over and over again and the batch file only prevents it from crashing it does not force the server to goto the update.)
When you do a cold start (i.e. run the batch without the server running already), does hldsupdatetool appear?
__________________
Dr. McKay is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode