Posted 07 September 2012 - 03:46 AM
I have made an installer which has a config! This installer can install up to 5 files; have a custom password to install files (or not); rename files when installing them; and more!
I am rather new to Lua, so please don't hate on me for excessive coding, or whatnot, but please do tell me what you think of it!
Also, I know that an installer isn't all THAT useful, but hey, I was bored.
IMPORTANT!: How to install files WITHOUT having to type a 1000 lines of code! (literally :D/>/>)
- Go to your computer, insert a disk into a drive!
- Type: pastebin get YvBTHHjK disk/startup
- File is installed on disk!
CONFIG IS IN THE startup FILE!
YOU MUST EDIT THE CONFIG TO HAVE PROGRAM WORK PROPERLY! ALSO: THERE MUST BE AT LEAST 1 FILE ON THE SAME DISK AS THE INSTALLER!
TO EDIT STARTUP ON DISK: Make sure computer is on, insert disk, DO NOT REBOOT COMPUTER! Type: "cd disk" without the quotes… Then type edit startup!
Please make sure to read the warnings and whatnot in the config, it helps a lot!
I am rather new to Lua, so please don't hate on me for excessive coding, or whatnot, but please do tell me what you think of it!
Also, I know that an installer isn't all THAT useful, but hey, I was bored.
IMPORTANT!: How to install files WITHOUT having to type a 1000 lines of code! (literally :D/>/>)
- Go to your computer, insert a disk into a drive!
- Type: pastebin get YvBTHHjK disk/startup
- File is installed on disk!
CONFIG IS IN THE startup FILE!
YOU MUST EDIT THE CONFIG TO HAVE PROGRAM WORK PROPERLY! ALSO: THERE MUST BE AT LEAST 1 FILE ON THE SAME DISK AS THE INSTALLER!
TO EDIT STARTUP ON DISK: Make sure computer is on, insert disk, DO NOT REBOOT COMPUTER! Type: "cd disk" without the quotes… Then type edit startup!
Please make sure to read the warnings and whatnot in the config, it helps a lot!
Spoiler
-- Configuration --
--[[
WARNINGS:
Do NOT remove "disk/" from in front of the filenames! It is used for installation; and will cause errors!
Do NOT remove config nodes PERIOD! Even if they are in use, it may cause errors!
Do NOT put something related to, or as: "List of features:" in the features line, as it will cause it to be displayed twice!
Follow the limits of the config nodes; and only put what is allowable within them!
--]]
-- Disk Drive Config --
local driveside = "right" --[[ Set to side of the Disk Drive. Valid sides: right, left, back, bottom, top, front. --]]
-- Password Installation Config --
local usepass = "false" --[[ Do you want a password to be required to install the programs? Set to true/false (Can prevent stealing). --]]
local password = "PASSWORD" --[[ What password do you want to use to allow installation? ONLY APPLIES IF usepass IS SET TO TRUE! --]]
-- Main Screen Config --
local greeting = "Thank You For Purchasing" --[[ Will be the first thing displayed before the program's name. After this, the explanation is shown. --]]
local explanation = "This program will provide you with stuff!" --[[ Short description of what the programs will do. Differs from features.--]]
-- File Names Config --
local rmstart = "false" --[[ Would you like to remove the startup from the computer when installing the files? Set to true/false DOES NOT APPLY IF AN INSTALLED FILE WILL BE RENAMED TO startup! --]]
local items = "1" --[[ How many files would you like to install from the disk? Set to a whole number between 1 - 5. SEE EXTRA CONFIG FOR NUMBERS ABOVE 1! --]]
local filename1 = "disk/APPLICATION" --[[ What is the file on disk's name that will be installed? --]]
local pcfilename1 = "APPLICATION" --[[ What do you want filename1 on disk to be renamed to when installed on a computer? CAN BE THE SAME AS FILENAME1! --]]
local formalname1 = "Program" --[[ What do you want to be displayed onscreen to players? Will be shown, can be any name. --]]
-- Feature List Config --
local features = "- Plays A Record For You And Friends! \n- Has Controls! \n- Can Eject Disk! \n- User Friendly Input! \n- ect..." --[[ Make a list of what features you want to be shown, "\n" starts a new line. If "\n" is not before an item it will be included on the same line as the past item. TOO LONG OF A LIST WILL CAUSE PLAYERS NOT TO SEE ALL FEATURES! --]]
-- EXTRA CONFIG --
--[[ You only need to edit the names of the programs that will be installed... EX: If I am only installing 2 files. I only edit up to filename2, pcfilename2, and formalname2! --]]
--[[ WARNING! DO NOT NAME MORE THAN ONE APPLICATION THE SAME NAME! EX: APPLICATION2 CANNOT BE THE SAME AS APPLICATION3, AND THIS ALSO GOES FOR PCFILENAMES! IF IGNORED, ALL BUT THE FIRST FILE WILL BE DELETED! --]]
local filename2 = "disk/APPLICATION2" --[[ Same idea as filename1, but is a second file name. --]]
local pcfilename2 = "APPLICATION2" --[[ Same idea as pcfilename1, but is a second pc file name. --]]
local formalname2 = "Program2" --[[ Same idea as formalname1, but is a second formal name. --]]
local filename3 = "disk/APPLICATION3" --[[ Same idea as filename1, but is a third file name. --]]
local pcfilename3 = "APPLICATION3" --[[ Same idea as pcfilename1, but is a third pc file name. --]]
local formalname3 = "Program3" --[[ Same idea as formalname1, but is a third formal name. --]]
local filename4 = "disk/APPLICATION4" --[[ Same idea as filename1, but is a fourth file name. --]]
local pcfilename4 = "APPLICATION4" --[[ Same idea as pcfilename1, but is a fourth pc file name. --]]
local formalname4 = "Program4" --[[ Same idea as formalname1, but is a fourth formal name. --]]
local filename5 = "disk/APPLICATION5" --[[ Same idea as filename1, but is a fifth file name. --]]
local pcfilename5 = "APPLICATION5" --[[ Same idea as pcfilename1, but is a fifth pc file name. --]]
local formalname5 = "Program5" --[[ Same idea as formalname1, but is a fifth formal name. --]]
-- END OF CONFIG! --
-- CODE --
--[[ It is recommended that you do not mess with the code as it may cause complications with the program --]]
function wp()
term.clear()
term.setCursorPos(1,1)
write("You Have Entered In An Incorrect Password!")
os.sleep(4)
write("\n\nYour Computer Will Now Be Shut Down!")
os.sleep(4)
os.shutdown()
end
function invalid()
term.clear()
term.setCursorPos(1,1)
write("Invalid Input!")
os.sleep(3)
write("\n\nRestarting Software!\n\n")
os.sleep(3)
os.reboot()
end
function itemerror()
term.clear()
term.setCursorPos(1,1)
write("ERROR: items Setting Is Invalid! Refer To Config!")
os.sleep(2)
write("\n\nExiting Program\n\n")
os.sleep(1)
return
end
function usepasserror()
term.clear()
term.setCursorPos(1,1)
write("ERROR: usepass Setting Is Invalid! Refer To Config!")
os.sleep(2)
write("\n\nExiting Program\n\n")
os.sleep(1)
return
end
function cancel()
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Cancelling Installation... Please Wait...")
os.sleep(2)
write("\nInstallation Cancelled Successfully!")
os.sleep(3)
if disk.isPresent(driveside) then
write("\n\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!")
end
os.sleep(2)
write("\nComputer Will Now Be Shut Down!")
os.sleep(2)
textutils.slowPrint("\n\nShutting Down Your Computer...")
os.sleep(1)
os.shutdown()
end
function showfeatures()
term.clear()
term.setCursorPos(1,1)
write("Features:\n\n" .. features .. "\n\nEnd Of Features!")
end
function inst1p()
term.clear()
term.setCursorPos(1,1)
write("\n\n\n\n\n\nPlease Enter The Password:\n\n\n\n> ")
local input = read("*")
if input == password then
term.clear()
term.setCursorPos(1,1)
write("The Entered Password Is Correct!\n")
os.sleep(2)
write("\nBeginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\n\nStartup Will Not Be Removed!\n")
else
write("\n\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
os.reboot()
else
wp()
end
end
function inst2p()
term.clear()
term.setCursorPos(1,1)
write("\n\n\n\n\n\nPlease Enter The Password:\n\n\n\n> ")
local input = read("*")
if input == password then
term.clear()
term.setCursorPos(1,1)
write("The Entered Password Is Correct!\n")
os.sleep(2)
write("\nBeginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\n\nStartup Will Not Be Removed!\n")
else
write("\n\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename2)
fs.copy(filename2, pcfilename2)
write("\n") write(formalname2) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
os.reboot()
else
wp()
end
end
function inst3p()
term.clear()
term.setCursorPos(1,1)
write("\n\n\n\n\n\nPlease Enter The Password:\n\n\n\n> ")
local input = read("*")
if input == password then
term.clear()
term.setCursorPos(1,1)
write("The Entered Password Is Correct!\n")
os.sleep(2)
write("\nBeginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\n\nStartup Will Not Be Removed!\n")
else
write("\n\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename2)
fs.copy(filename2, pcfilename2)
write("\n") write(formalname2) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename3)
fs.copy(filename3, pcfilename3)
write("\n") write(formalname3) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
return
else
wp()
end
end
function isnt4p()
term.clear()
term.setCursorPos(1,1)
write("\n\n\n\n\n\nPlease Enter The Password:\n\n\n\n> ")
local input = read("*")
if input == password then
term.clear()
term.setCursorPos(1,1)
write("The Entered Password Is Correct!\n")
os.sleep(2)
write("\nBeginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\nStartup Will Not Be Removed!\n")
else
write("\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename2)
fs.copy(filename2, pcfilename2)
write("\n") write(formalname2) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename3)
fs.copy(filename3, pcfilename3)
write("\n") write(formalname3) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename4)
fs.copy(filename4, pcfilename4)
write("\n") write(formalname4) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
os.reboot()
else
wp()
end
end
function inst5p()
term.clear()
term.setCursorPos(1,1)
write("\n\n\n\n\n\nPlease Enter The Password:\n\n\n\n> ")
local input = read("*")
if input == password then
term.clear()
term.setCursorPos(1,1)
write("The Entered Password Is Correct!\n")
os.sleep(2)
write("\nBeginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\nStartup Will Not Be Removed!\n")
else
write("\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename2)
fs.copy(filename2, pcfilename2)
write("\n") write(formalname2) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename3)
fs.copy(filename3, pcfilename3)
write("\n") write(formalname3) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename4)
fs.copy(filename4, pcfilename4)
write("\n") write(formalname4) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename5)
fs.copy(filename5, pcfilename5)
write("\n") write(formalname5) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
os.reboot()
else
wp()
end
end
function inst1()
term.clear()
term.setCursorPos(1,1)
write("Beginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\nStartup Will Not Be Removed!\n")
else
write("\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
os.reboot()
end
function isnt2()
term.clear()
term.setCursorPos(1,1)
write("Beginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\nStartup Will Not Be Removed!\n")
else
write("\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename2)
fs.copy(filename2, pcfilename2)
write("\n") write(formalname2) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
os.reboot()
end
function inst3()
term.clear()
term.setCursorPos(1,1)
write("Beginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\nStartup Will Not Be Removed!\n")
else
write("\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename2)
fs.copy(filename2, pcfilename2)
write("\n") write(formalname2) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename3)
fs.copy(filename3, pcfilename3)
write("\n") write(formalname3) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
os.reboot()
end
function inst4()
term.clear()
term.setCursorPos(1,1)
write("Beginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\nStartup Will Not Be Removed!\n")
else
write("\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename2)
fs.copy(filename2, pcfilename2)
write("\n") write(formalname2) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename3)
fs.copy(filename3, pcfilename3)
write("\n") write(formalname3) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename4)
fs.copy(filename4, pcfilename4)
write("\n") write(formalname4) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\n\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
os.reboot()
end
function inst5()
term.clear()
term.setCursorPos(1,1)
write("Beginning Your Installation!")
os.sleep(2)
textutils.slowPrint("\n\nChecking If PC Should Remove Startup!")
os.sleep(2)
if rmstart == "True" or rmstart == "true" then
write("\nStartup Will Be Removed!\n")
os.sleep(1)
textutils.slowPrint("\nRemoving Startup...")
os.sleep(2)
fs.delete("startup")
elseif rmstart == "False" or rmstart == "false" then
write("\nStartup Will Not Be Removed!\n")
else
write("\nStartup Setting Invalid! Not Deleteing Startup!\n")
end
os.sleep(2)
textutils.slowPrint("\nInstalling Items...")
os.sleep(3)
fs.delete(pcfilename1)
fs.copy(filename1, pcfilename1)
write("\n") write(formalname1) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename2)
fs.copy(filename2, pcfilename2)
write("\n") write(formalname2) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename3)
fs.copy(filename3, pcfilename3)
write("\n") write(formalname3) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename4)
fs.copy(filename4, pcfilename4)
write("\n") write(formalname4) write(" Installed!")
os.sleep(3)
fs.delete(pcfilename5)
fs.copy(filename5, pcfilename5)
write("\n\n") write(formalname5) write(" Installed!")
os.sleep(2)
write("\n\nInstallations Finished!")
os.sleep(2)
write("\n\nPreparing To Eject Disk.")
os.sleep(2)
textutils.slowPrint("\n\nChecking For Disk!")
os.sleep(2)
if disk.isPresent(driveside) then
write("\n\nDisk Will Now Be Ejected!")
os.sleep(2)
textutils.slowPrint("\nEjecting Disk...")
os.sleep(1)
disk.eject(driveside)
else
write("\nDisk Not Found! Not Ejecting!\n")
end
os.sleep(2)
write("\nYour Computer Will Now Reboot!")
os.sleep(2)
os.reboot()
end
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Loading Installer...")
os.sleep(1)
write("\nInstaller Loaded!")
os.sleep(1)
term.clear()
term.setCursorPos(1,1)
if usepass == "True" or usepass == "true" then
if items == "1" then
write(greeting .. " ") write(formalname1) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install ") write(formalname1 .. "?")
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Coninue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst1p()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst1p()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
elseif items == "2" then
write(greeting .. " ") write(formalname1 .. " and ") write(formalname2) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install These Programs?\n\n") write(formalname1 .. "\n") write(formalname2)
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Continue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst2p()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst2p()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
elseif items == "3" then
write(greeting .. " ") write(formalname1 .. ", ") write(formalname2 .. ", and ") write(formalname3) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install These Programs?\n\n") write(formalname1 .. "\n") write(formalname2 .. "\n") write(formalname3)
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Continue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst3p()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst3p()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
elseif items == "4" then
write(greeting .. " ") write(formalname1 .. ", ") write(formalname2 .. ", ") write(formalname3 .. ", and ") write(formalname4) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install These Programs?\n\n") write(formalname1 .. "\n") write(formalname2 .. "\n") write(formalname3 .. "\n") write(formalname4)
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Continue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst4p()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst4p()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
elseif items == "5" then
write(greeting .. " ") write(formalname1 .. ", ") write(formalname2 .. ", ") write(formalname3 .. ", ") write(formalname4 .. ", and ") write(formalname5) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install These Programs?\n\n") write(formalname1 .. "\n") write(formalname2 .. "\n") write(formalname3 .. "\n") write(formalname4 .. "\n") write(formalname5)
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Continue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst5p()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst5p()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
else
itemerror()
end
elseif usepass == "False" or usepass == "false" then
if items == "1" then
write(greeting .. " ") write(formalname1) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install ") write(formalname1 .. "?")
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Coninue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst1()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst1()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
elseif items == "2" then
write(greeting .. " ") write(formalname1 .. " and ") write(formalname2) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install These Programs?\n\n") write(formalname1 .. "\n") write(formalname2)
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Continue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst2()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst2()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
elseif items == "3" then
write(greeting .. " ") write(formalname1 .. ", ") write(formalname2 .. ", and ") write(formalname3) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install These Programs?\n\n") write(formalname1 .. "\n") write(formalname2 .. "\n") write(formalname3)
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Continue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst3()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst3()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
elseif items == "4" then
write(greeting .. " ") write(formalname1 .. ", ") write(formalname2 .. ", ") write(formalname3 .. ", and ") write(formalname4) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install These Programs?\n\n") write(formalname1 .. "\n") write(formalname2 .. "\n") write(formalname3 .. "\n") write(formalname4)
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Continue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst4()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst4()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
elseif items == "5" then
write(greeting .. " ") write(formalname1 .. ", ") write(formalname2 .. ", ") write(formalname3 .. ", ") write(formalname4 .. ", and ") write(formalname5) write("! " .. explanation)
write("\n\nWould You Like To View A List Of Features Before You Install These Programs?\n\n") write(formalname1 .. "\n") write(formalname2 .. "\n") write(formalname3 .. "\n") write(formalname4 .. "\n") write(formalname5)
write("\n\nType Yes, No, Or Cancel. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
showfeatures()
write("\nWould You Like To Continue With Installation? \n\nType Yes Or No. \n\n> ")
local input = read()
if input == "Yes" or input == "yes" then
inst5()
elseif input == "No" or input == "no" then
cancel()
else
invalid()
end
elseif input == "No" or input == "no" then
inst5()
elseif input == "Cancel" or input == "cancel" then
cancel()
else
invalid()
end
else
itemerror()
end
else
usepasserror()
end