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

How to make an installer

Started by MonkeyDew, 20 November 2012 - 04:19 AM
MonkeyDew #1
Posted 20 November 2012 - 05:19 AM
I am trying to make a disk that will copy & replace some files

however it wont replace/delete startup

everytime it trys it gives me the reason

Install:1: Access Denied

here is my code:

fs.copy("disk/startup", "rom")
fs.copy("disk/password", "rom")
print("Installation complete!")
sleep(0.25)
print("Rebooting")
os.reboot()
Orwell #2
Posted 20 November 2012 - 05:36 AM
You can't copy it to rom, rom is read only memory. What you probably want to do is copying it to the main directory. Like this:

fs.copy("disk/startup", "startup")
fs.copy("disk/password", "password")
print("Installation complete!")
sleep(0.25)
print("Rebooting")
os.reboot()