Introduction: Batch Updater/Installer
After playing around with batch, I have figured out how to make an installer/updater using only batch/bitsadmin.
However, I have currently only got this working with MediaFire links, so if you don't use MediaFire then I don't know.
Step 1: Setting Up the Updater/Installer
To start, create a .bat or .cmd file (name it whatever) and insert this code.
Now, because I've messed around with it, it's a 'fancy' and 'stylish' looking .bat
The next part will deconstruct the script and I will tell you what to do.
Step 2: Script Explanation
This is what you need to edit: (Use some sort of "replace text" tool like in Notepad)
INSTALL_DIRECTORY / This is where your .bat gets installed. (ex. %UserProfile%\Desktop\Batch)
www.mediafire.com/file/1234567890/ / This is your MediaFire link. This is attached to "http://getlink.s2u.vn/redirect.php?link=" and you MUSTonly edit the MediaFire link or else the direct download would mess everything up. Also notice how the "http://" is removed in the MediaFire link. This is also critical for having this code work. (ex. www.mediafire.com/file/o23us8krshmhatd/AI+v2.bat [OR] http://getlink.s2u.vn/redirect.php?link=www.mediafire.com/file/o23us8krshmhatd/AI+v2.bat)
version.txt / This is where you're version file is. It does not have to end with .txt. (ex. batch.version)
YOUR_BATCH.bat / This is you're .bat file. (ex. program.bat)
Step 3: File Setup
You're going to want to navigate to https://www.mediafire.com/ and sign in if you havn't.
You want to upload your .bat and then create a .txt file.¹
In the .txt file You can add any version you want that matches what version you want your batch file to be. (ex. 1.0.1)
¹ - You can create a file on your computer and upload it (ex. batch.version) but with MediaFire's built-in text editor I find it much easier.
Step 4: Fill Everything In!
Now that you have everything setup and you know what to do, replace everything with what you need.
Remember, when you're copying the MediaFire links be sure to remove the "https://" or it will not work!
Step 5: And You're Done!
I have attached my installer for you to enjoy and fix you're mistakes.
If you're still having problems, just ask for help!
Also, sorry if this was horribly explained and/or layed out. This is my first post so please be easy on me!
We have a be nice policy.
Please be positive and constructive.