You can change the way the HP Software Update program runs using the following steps: Click Start From the Programs menu, click the HP or Hewlett-Packard group. Click the HP Software Update shortcut. This will start the HP Software Update program. In the HP Software Update window, click the Configure button.
PermalinkJoin GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
- From there, you can access important details, update settings, and control your server from a single page. Each game is manually configured and continuously updated to ensure your game server stays up-to-date.
- The Auto-Patcher will download from any web site you specify and update any files you have modified since players have downloaded your game (maps, graphics, and anything else). Auto Patcher uses any web server you can upload to thus saving your game servers bandwidth if your connection isn't a big one.
- Hello Developers, Today we released an update that altered how server lists are displayed on the games page. We know many of you have questions and concerns about this update so we wanted to address them here.
Find file Copy path
1 contributor
@ECHOOFF |
:::: |
:: SteamCMD Auto Updater 1.7 :: |
:: Credits :: |
:: C0nw0nk :: |
:::: |
:: https://github.com/C0nw0nk/SteamCMD-AutoUpdate-Any-Gameserver :: |
:: This is the SteamDEV api key required for automatic updates :: |
:: If you do not have one you may obtain your API key from here = http://steamcommunity.com/dev/apikey :: |
setsteamkey= |
:: This is the required login for SteamCMD to download updates :: |
:: example = login=C0nw0nk Password :: |
:: For most game servers you do not require this and can leave it as anonymous :: |
:: Certain game servers you have to use a username and password to install them :: |
setlogin=anonymous |
:: This is the directory you wish to install and keep your server updated to :: |
setinstall_directory=C:game-serversCSGO |
:: This is for the directory where you installed steamcmd :: |
:: http://media.steampowered.com/installer/steamcmd.zip :: |
setsteamcmd_path=C:steamcmdsteamcmd.exe |
:: This is the path to the exe of the game server this allows us to close and run the server for and after a update :: |
:: Other command line variables for srcds can be found here https://developer.valvesoftware.com/wiki/Command_Line_Options :: |
:: Example :: |
:: set exe_path=C:game-serversCSGOsrcds.exe -game csgo -console -nocrashdialog -port 27015 +clientport 27005 +map de_dust2 :: |
setexe_path=C:game-serversCSGOsrcds.exe -game csgo -console -nocrashdialog -port 27015 +clientport 27005 +map de_dust2 |
:: This is the title of your server this will help you know what server this auto updater is running for :: |
setservername=My CSGO#1 Server |
:: This is the app ID of the game server you are installing / running :: |
setappid=740 |
:: This is the app ID the url will check for updates on that game :: |
:: Some games this is the same as the installation appid other games it is a different numeric value :: |
:: if your latest-version.txt file is empty you need to make this value different to the installation appid, just go to the steam store page and get the appid from the end url :: |
setupdate_appid=730 |
:: Automatic Updating Interval (in seconds) this will set how often you check the steam servers for a new update :: |
:: I recommend 5-10 mins maximum :: |
:: Default value 60 seconds 1 minute :: |
setinterval=60 |
:: Suppress application error messages, Usualy when your game server crashes you get flagged the following error :: |
:: 'srcds.exe has stopped working. Windows can check online for a solution to the problem' :: |
:: and even after disabling error reporting and the message above you will get the following message instead :: |
:: 'srcds.exe has stopped working. A problem caused the program to stop working correctly. Please close the program' :: |
:: With the following setting the script will prevent all these errors and get your server back online as soon as a crash occurs :: |
:: set to false to disable this feature :: |
:: Use -nocrashdialog in exe_path to also help suppress server crashes :: |
setsuppress_errors=true |
:: Don't edit anything past this point :: |
:: I AM SERIOUS DO NOT TOUCH :: |
:: DON'T MAKE ME HURT YOU! :: |
:: il fite u :: |
:: Do you realy want some! :: |
:: Come on don't be a skrub! :: |
:: Sorry did not mean anything I just said go ahead and edit below this point see if I care (seriously just don't touch anything below this):: |
:: for the fact you have even scrolled down this far shows your persistence :: |
title%servername% SteamCMD Auto Updater V1.7 |
rem set window and text color |
color 8a |
setlocalenableDelayedExpansion |
if'%suppress_errors%''false' ( |
reg add 'HKEY_LOCAL_MACHINESYSTEMControlSet001ControlWindows' /v ErrorMode /t REG_DWORD /d 0 /f >nul2>&1 |
reg add 'HKEY_CURRENT_USERSoftwareMicrosoftWindowsWindows Error Reporting' /v DontShowUI /t REG_DWORD /d 0 /f >nul2>&1 |
) else ( |
reg add 'HKEY_LOCAL_MACHINESYSTEMControlSet001ControlWindows' /v ErrorMode /t REG_DWORD /d 2 /f >nul2>&1 |
reg add 'HKEY_CURRENT_USERSoftwareMicrosoftWindowsWindows Error Reporting' /v DontShowUI /t REG_DWORD /d 1 /f >nul2>&1 |
) |
FOR /f %%i IN ('%install_directory%') DO ( |
setfiledrive=%%~di |
setfilepath=%%~pi |
setfilename=%%~ni |
setfileextension=%%~xi |
) |
ifexist%filedrive%%filepath%%filename% ( |
echo file path exist >nul |
) else ( |
echo create install_directory since it does not exist |
mkdir%filedrive%%filepath%%filename% |
) |
FOR /f %%i IN ('%steamcmd_path%') DO ( |
setfiledrive=%%~di |
setfilepath=%%~pi |
setfilename=%%~ni |
setfileextension=%%~xi |
) |
setdownloadurl=http://media.steampowered.com/installer/steamcmd.zip |
setdownloadpath=%filedrive%%filepath%steamcmd.zip |
ifexist%filedrive%%filepath%%filename%%fileextension% ( |
echo file path exist >nul |
) else ( |
echo create steamcmd_path since it does not exist |
mkdir%filedrive%%filepath% |
( |
echo Dim oXMLHTTP |
echo Dim oStream |
echo Set oXMLHTTP = CreateObject^('MSXML2.XMLHTTP.3.0'^) |
echo oXMLHTTP.Open 'GET', '%downloadurl%', False |
echo oXMLHTTP.Send |
echo If oXMLHTTP.Status = 200 Then |
echo Set oStream = CreateObject^('ADODB.Stream'^) |
echo oStream.Open |
echo oStream.Type = 1 |
echo oStream.Write oXMLHTTP.responseBody |
echo oStream.SaveToFile '%downloadpath%' |
echo oStream.Close |
echo End If |
echo ZipFile='%downloadpath%' |
echo ExtractTo='%filedrive%%filepath%' |
echo Set fso = CreateObject^('Scripting.FileSystemObject'^) |
echo If NOT fso.FolderExists^(ExtractTo^) Then |
echo fso.CreateFolder^(ExtractTo^) |
echo End If |
echo set objShell = CreateObject^('Shell.Application'^) |
echo set FilesInZip=objShell.NameSpace^(ZipFile^).items |
echo objShell.NameSpace^(ExtractTo^).CopyHere^(FilesInZip^) |
echo Set fso = Nothing |
echo Set objShell = Nothing |
)>>'%~n0-temp.vbs' |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
) |
goto error |
:loop |
ifexist %~n0-latest-version.txt ( |
rem echo file exist so do nothing and perform file check to compare existing files |
del %~n0-latest-version.txt |
) |
( |
echo Dim oXMLHTTP |
echo Dim oStream |
echo Set oXMLHTTP = CreateObject^('MSXML2.XMLHTTP.3.0'^) |
echo oXMLHTTP.Open 'GET', 'http://api.steampowered.com/ISteamUserStats/GetSchemaForGame/v2/?key=%steamkey%&appid=%update_appid%&format=json', False |
echo oXMLHTTP.Send |
echo If oXMLHTTP.Status = 200 Then |
echo Set oStream = CreateObject^('ADODB.Stream'^) |
echo oStream.Open |
echo oStream.Type = 1 |
echo oStream.Write oXMLHTTP.responseBody |
echo oStream.SaveToFile '%~n0-latest-version.txt' |
echo oStream.Close |
echo End If |
)>>'%~n0-temp.vbs' |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
rem call to get the latest game server version from the steam servers |
ifexist %~n0-current-version.txt ( |
rem echo file exist so do nothing and perform file check to compare existing files |
echo''>nul |
) else ( |
rem echo file doesn't exist so create it and update / install the game server to the latest version |
COPY %~n0-latest-version.txt %~n0-current-version.txt |
goto error |
) |
rem file check compare the latest game server version with the current and if they match or miss match |
fc %~n0-latest-version.txt %~n0-current-version.txt >nul |
iferrorlevel1goto shutdown_server |
:next |
rem echo file version match with currently installed so do nothing and attempt to start the server if not already running |
rem get the running game server process id from our pid file |
set /p texte=< %~n0-pid.txt |
rem echo %texte% |
rem use the process id and check if it is running or not |
rem find process id of game server that should be running and if status is not responding or unknown it means the server has crashed |
set'cmd2=tasklist.exe /fi 'pid eq %texte%' /fi 'status ne running'' |
for /F 'delims=*'%%p in ('!cmd2!^| findstr'%texte%' ') do ( |
rem echo pid running but frozen or not responding so terminate |
taskkill /PID %texte% |
goto next |
) |
rem check process id to see if running and active |
set'cmd=tasklist.exe /FI 'pid eq %texte%'' |
for /F 'delims=*'%%p in ('!cmd!^| findstr'%texte%' ') do ( |
rem echo pid running and found %%p |
timeout /t %interval% /NOBREAK |
goto loop |
) |
rem echo pid not found pause so start running the game server and get game server pid |
rem process id in pid file not found or running so lets start the game server to get it running and store the game server pid in the file |
for /f 'tokens=2 delims; '%%a in (' wmic process call create '%exe_path%'^| find'ProcessId' ') do setPID=%%a |
echo%PID%> %~n0-pid.txt |
timeout /t %interval% /NOBREAK |
goto loop |
pause |
:error |
rem echo failed check so execute steamcmd to update / install the server |
rem First we have to kill the running game server pid in order to update it |
rem get the running game server process id from our pid file |
set /p texte=< %~n0-pid.txt |
rem echo %texte% |
rem use the process id and check if it is running or not |
set'cmd=tasklist.exe /FI 'pid eq %texte%'' |
for /F 'delims=*'%%p in ('!cmd!^| findstr'%texte%' ') do ( |
rem echo pid of game server running and found so kill / end the process %%p |
taskkill /PID %texte% |
) |
rem execute updater and then close when updates installed and validated |
%steamcmd_path% +login %login% +force_install_dir %install_directory% +app_update %appid% validate +quit |
rem when update complete go back to the start and check for updates on a regular basis again and launch the updated game server |
rem we cant forget to set the current version to the latest installed version |
COPY %~n0-latest-version.txt %~n0-current-version.txt >nul |
goto loop |
pause |
:shutdown_server |
set /p texte=< %~n0-pid.txt |
set'cmd=tasklist.exe /FI 'pid eq %texte%'' |
for /F 'delims=*'%%p in ('!cmd!^| findstr'%texte%' ') do (goto :console_vbs1) |
:console_vbs1 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 60 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 30 /NOBREAK |
goto :console_vbs2 |
:console_vbs2 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 30 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 20 /NOBREAK |
goto :console_vbs3 |
:console_vbs3 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 10 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs4 |
:console_vbs4 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 9 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs5 |
:console_vbs5 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 8 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs6 |
:console_vbs6 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 7 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs7 |
:console_vbs7 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 6 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs8 |
:console_vbs8 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 5 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs9 |
:console_vbs9 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 4 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs10 |
:console_vbs10 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 3 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs11 |
:console_vbs11 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 2 seconds for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs12 |
:console_vbs12 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server will shut down in 1 second for updates!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
timeout /t 1 /NOBREAK |
goto :console_vbs13 |
:console_vbs13 |
echo Option Explicit >%~n0-temp.vbs |
echo Dim Shell, WMI, wql, process >>%~n0-temp.vbs |
echo Set Shell = CreateObject('WScript.Shell') >>%~n0-temp.vbs |
echo Set WMI = GetObject('winmgmts:{impersonationLevel=impersonate}!.rootcimv2') >>%~n0-temp.vbs |
echo wql = 'SELECT ProcessId FROM Win32_Process WHERE ProcessId = %texte%'>>%~n0-temp.vbs |
echo For Each process In WMI.ExecQuery(wql) >>%~n0-temp.vbs |
echo Shell.AppActivate process.ProcessId >>%~n0-temp.vbs |
echo Shell.SendKeys 'say Server is shutting down to install updates, Goodbye!'>>%~n0-temp.vbs |
echo Shell.SendKeys '{ENTER}'>>%~n0-temp.vbs |
echo Next >>%~n0-temp.vbs |
cscript //nologo %~n0-temp.vbs &del %~n0-temp.vbs |
goto :error |
pause |
Copy lines Copy permalink
Active1 year, 11 months ago
I'm developing a non-public Android app, i.e. the app won't be available in the global Android Market. The app will be installed on a limited number of clients, e.g. by using an apk file.How can I enable an auto-update functionality in this app?
I see different potential options (I do not know if those are technically hard or even impossible to implement or if there are any existing functionalities that can be reused):
- On each launch the app tests if a new version exists (by requesting a server), if so downloads the new apk and replaces itself with the new version.
- Use (or develop?) a separated app or service that undertakes the update-check and replacement-process.
- Use (or develop?) a private market app which has an auto-update option. This option is similar to the second one, but more generic: The market app would be connected to a repository, i.e. it would handle an arbitrary number of (private) apps.
I would prefer option one since the auto-update functionality is included in the app which needs less development efforts.
Richard Russell58911 gold badge66 silver badges1919 bronze badges
janjonasjanjonas
1,74822 gold badges1818 silver badges2525 bronze badges
6 Answers
janjonas, in the company I work we had a similar problem with Windows Mobile 6.x, and we use pretty much the same solution pointed by EboMike:
Game Server Auto Update Ubuntu
The main app check if it's updated, against a WebService. It receives the current version & the URL from where download the new version, if necessary. The main app then start the Updater app, passing the URL, and quit.
The Updater do the download of the new program, via HTTP, showing to the user the % downloaded. The user can cancel the download anytime, in a controlled way, and the Updater can registry this cancellation.
Since the new app is downloaded, the Updater run the new app, and quit.
tcbraziltcbrazil
I think option one is the least amount of work for you, and actually the cleanest one too since it will go through the proper channel of using Android's built-in package installer which includes user notification and the option for the user to abort the installation if desired.
You already have it all outlined - check for a new version on a server (would be nice to give the user the option to turn that off), and if there is a new version, you could either just link to the URL with the APK (which will, IIRC, use the browser's download manager to download it), or you could download it with your app and then point the intent to your local file. Using the HTTP link is technically less work and cleaner - the more you let the operating system do, the better - unless there's a reason not to.
EboMikeEboMike67k1414 gold badges144144 silver badges149149 bronze badges
Enabling 'Install non-market app' is still needed for any application outside the Google Play. If it not enabled, the installation process is going to ask for it and redirect the user to the Application Settings, and after that, the user can install the app.
Depending on your needs, you can delegate to a third part lib.
Matt64.5k1818 gold badges123123 silver badges166166 bronze badges
CelinHCCelinHC1,00011 gold badge1919 silver badges3030 bronze badges
Some of the permissions we'll use to get this done are the following:
Let me explain a bit.. The last, WRITE_EXTERNAL_STORAGE, is self-explanatory. With ACCESS_SUPERUSER we'll tell the system that we intend to use root privileges. READ_EXTERNAL_STORAGE will be needed in the future in order for your app to read files on SD card.
Now we recommend you to Download first result Welcome To The Show With Lyrics My Little Pony Equestria Girls Rainbow Rocks Song MP3 which is uploaded by MLP Songs of size 7.76 MB, duration 5 minutes and 54 seconds and bitrate is 192 Kbps. Please Note: Before downloading you can preview any song by mouse over the Play button and click Play or Click to Download button to download hd quality mp3 files. My little pony equestria girl rainbow rocks songs download 2017.
Assuming that you have downloaded the file and that all those devices can be rooted (limited number of clients, not on Play, etc.), you could do this:
Nikola TulimirovicNikola Tulimirovic
Game Server Auto Update Update
Here might be a very lame method but for some companies, if you believe its applicable, this might be very easy to implement.
- Create an password screen (passwordActivity) that asks a password to access the application.
- Once the password is entered, raise a flag (set a boolean value from false to true using sharedpreferences)
- Place the .apk file on Google Store.
- Change the password once everyone installs the app, and release a new update on Google Play Store.
Since the software is going to cache the flag value, the password screen won`t show up even the password is change. It will only show up for new installations so might need to repeat the process.
Note: This method might better fit if there is not hundreds of users using the application. And don`t forget this method is also not secure. To sum up, if you are looking a way to keep the application private and have no security concerns, this is what I recommend.
0014001448722 gold badges99 silver badges2929 bronze badges
Update appMake sure that you already have your new apk download on location
wizmeaaaawizmeaaaa