Running A Program At Startup

Started by googleuser3212, Jul 12, 2022, 04:21 pm

Previous topic - Next topic

googleuser3212

Is there any way for me to setup a computer to run a certain program at startup?

PC_Cat

Jul 12, 2022, 05:10 pm #1 Last Edit: Jul 12, 2022, 05:23 pm by PC_Cat
Hey,

Yes, there is a easy way! Just name your program startup, or startup.lua.
If you don't want to rename the program, you can make a program called startup and in it put:
Code Select
shell.run("programname.lua")If I remember correctly you can also put the program in a folder called "startup", but i am not sure if that works, or if it is a feature of mildly better shell.

Do note that if you have a mount(floppy disk) that contains a startup file, the computer will prioritize the one on the disk. This can be disabled with the following command:
Code Select
set shell.allow_disk_startup falseNote: disk startup is by default disabled on command computers (Creative mode item).
If you want to disable normal startup you can run:
Code Select
set shell.allow_startup false
Also, next time you have a problem try to Google(or other search engine) it before posting. You even have "google" in your name 😁.

Hope that helps! 👋
Meow! 😺 | Krist: [email protected] or katpcscili or cats.kst