This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Keymash's profile picture

Easy to use auto file installer

Started by Keymash, 23 March 2015 - 11:42 AM
Keymash #1
Posted 23 March 2015 - 12:42 PM
http://pastebin.com/5zi4j4Vt

Hello users. I just joined the forum and wanted to share what I have spent the past few hours working on. This is my first published program so please be nice :)/>

Basically, this little program will automatically install a program/file on a computer (simple or advanced) in seconds. I wrote this program because I was setting up many computers and wireless modems in SMP and thought it would be easier and more fun to make a program that does it for me. However, this only has the installer.

I have neatly commented a lot of the code and indicated what you will need to change to make it work best for you. Feel free to chop it up and possibly make it more efficient if you want. I am new to programming and writing this involved learning new APIs/funtions I had never used or heard of before. I had fun writing it.

How to use:
Simply use:

pastebin get 5zi4j4Vt <name of script>
and put it on a disk. I call the script 'startup' because it's easier that way.
Next you will want to put your program you want to install on other computers onto the disk.
Simply place the disk in a disk drive next to the computer you want to install it on and reboot said computer.
It will come ask if you want to install the file. If it detects a file with the same name as your program, it will ask if you want to overwrite it.
After that, the file will be installed, the computer reboots and ejects the disk.

I only ask that you do not use it for malicious means.

Examples of uses:
Mass programming turtles or computers?

I can only think of one advantage over using pastebin though. It is easy to update computers with newer versions of your programs without having to worry about pastebin links.
Lupus590 #2
Posted 23 March 2015 - 05:00 PM
Welcome to the forums!

Also, well done on your first public script, it looks very clean/well coded for a first.

A few pointers:
line 16 doesn't need the 'do' and 'end'
line 22 in longer scripts, it is recommended that any variable/constant the user must change is better placed at the top, create a variable named 'diskSide' or something
Edited on 23 March 2015 - 04:00 PM