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

Disk Auto-run

Started by Lur_, 10 June 2015 - 03:25 AM
Lur_ #1
Posted 10 June 2015 - 05:25 AM
I was just thinking how I could run a program wide-spread on a network of computers, to update a program.
What came to my mind, was disks, that when inserted, were ran.
For example, if you had a file in a disk, called "autorun", as soon as that disk is inserted, the program is ran.

Some uses of this would be:
- Wide-spread updating
- An OS installer, without having to restart.
- A virus remover (for those pesky ones on LurCraft, especially!)
- etc.
flaghacker #2
Posted 10 June 2015 - 06:14 AM
If you have a file called "startup" in a disk drive, it will be run as soon as the computer reboots, with a priority above the startup file of the ccomputer itself.
Lur_ #3
Posted 10 June 2015 - 07:18 AM
If you have a file called "startup" in a disk drive, it will be run as soon as the computer reboots, with a priority above the startup file of the ccomputer itself.
I know! But I'm talking about an autorun file. For example, instead of a reboot, its automatically ran when it enters the computer. This means that an autorun file does NOT need a reboot. This could help with updating programs, while it is running, so you dont have downtime.

I have a working script on my beta server at the moment, which people have come to appreciate.
Edited on 10 June 2015 - 05:26 AM
theoriginalbit #4
Posted 10 June 2015 - 09:20 AM
people would exploit this to no end, so I don't see this happening. especially since it seems that you want this "autorun" file takes priority over "startup".

it is just better to have a script that runs in the background and waits for the disk event and restarts the computer.