Auto-update facotrio windows Batch script help

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
kevin28115
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Aug 14, 2017 11:39 pm
Contact:

Auto-update facotrio windows Batch script help

Post by kevin28115 »

Hi, I was wondering if there is a windows batch script for updating factorio? (windows)


From what I can gather it seems that it requires --apply=update arg so I have the following

start /high /wait factorio.exe --apply-update arg

however, it doesn't work and asked for a path to arg and then needed info.json
I created a file directory for /arg and made a blank info.json

The script doesn't update for obvious reasons but from the cmd did have an interesting path for https://updater.factorio.com/get-availa ... iVersion=2 which implied that the updater package can be downloaded directly from the website. However when I tried to obtain this it says that the username and token doesn't match. I tried the token both as my login pass as well as my player token from the playe-data.json. Both of which did not work. (can someone verify this? as I'm not sure if it's just me not understanding how to put the player token into url correctly). Also it says that there are 1 available update but doesn't download it for whatever reason.

After this I updated one of the factorio folder that I had and obtained the "core-win64-0.16.35-0.16.36-update.zip" which was downloaded to the temp folder. From that I extracted the folder and remamed the foler arg (inside it has an info.json). I dragged that folder into the other non-updated factorio and ran the script, it worked (other than that it launched factorio in the end but that's minor since it launched the correct version).

so what this boils down to a way to download the update packag and then renaming the package to arg (or whatever you specify the name is in the batch script) and putting it in the right location. or have the --apply-update have an auto-download feature as well instead of simply telling me that there is an update available. That's just cruel.


any help is appreciated and thanks for reading this long post seeking help.

Loewchen
Global Moderator
Global Moderator
Posts: 8355
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Auto-update facotrio windows Batch script help

Post by Loewchen »

"arg" is simply the place holder text (argument) in the documentation of the "--apply-update" (or any other that expects an argument) command, it expects the path to the update file. I believe I have seen scripts that fetch and then use the path of the update .zip directly on the server, but I can not find it right now.
No idea why the token does not work.

Edit: See: https://github.com/narc0tiq/factorio-updater

kevin28115
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Aug 14, 2017 11:39 pm
Contact:

Re: Auto-update facotrio windows Batch script help

Post by kevin28115 »

Loewchen wrote:"arg" is simply the place holder text (argument) in the documentation of the "--apply-update" (or any other that expects an argument) command, it expects the path to the update file. I believe I have seen scripts that fetch and then use the path of the update .zip directly on the server, but I can not find it right now.
No idea why the token does not work.

Edit: See: https://github.com/narc0tiq/factorio-updater
yes. arg can be any name and such. But I am unable to get the files in the first place. The github is a python script which I've skimmed through and it seems to try and download the update from the same location. I've honestly never used a python script and wonder if I need to download anything for it to work? (plus I would love to get a batch script to work :P)

Post Reply

Return to “Technical Help”