Quipex

Disk/uninstall

Apr 22nd, 2012
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. function reading()
  2. sleep(0.5)
  3. write "."
  4. end
  5.  
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. shell.run('disk/mem/redworks/apis/redworks')
  9. print(" _ \\ | | ")
  10. print(" / -_) _' | \\ \\ \\ / _ \\ _| | / (_-< ")
  11. print(" _|_\\ \\___| \\__,_| \\_/\\_/ \\___/ _| _\\_\\ ___/ ")
  12. print(" Development Team at http://redworksos.com")
  13.  
  14. --Pre-Uninstall
  15. term.setCursorPos(1,5)
  16. print"+________________________________________________+"
  17. term.setCursorPos(20,7)
  18. sprint("WARNING!!!")
  19. term.setCursorPos(1,7)
  20. print"+------------------------------------------------+"
  21. print("\nThis will remove ALL files, located in Redworks\nfolder structure, including user accounts.\n\nPlease Backup before proceeding.")
  22. print("The changes are NOT reversable!\nYou have been warned.")
  23. term.setCursorPos(1,17)
  24. print("To proceed press ENTER. To Cancel Press BACKSPACE")
  25.  
  26. while true do
  27. fault, event, param1, param2, param3 = pcall(os.pullEvent)
  28. if fault == false then
  29. elseif event == "key" and param1 == 14 then
  30. shell.run("disk/startup")
  31. elseif event == "key" and param1 == 28 then
  32. break end
  33. end
  34.  
  35. --Uninstallation
  36. term.clear()
  37. term.setCursorPos(1,2)
  38. write "Reading files"
  39. for n=1,5 do
  40. reading()
  41. end
  42. write "\n\nRemoving Redworks core files"
  43. for n=1,4 do
  44. reading()
  45. end
  46. print"Done."
  47. write "\nRemoving Redworks libraries"
  48. for n=1,3 do
  49. reading()
  50. end
  51. print"Done."
  52. write "\nRemoving Redworks programs"
  53. for n=1,2 do
  54. reading()
  55. end
  56. print"Done."
  57. write "\nRemoving user accounts."
  58. for n=1,2 do
  59. reading()
  60. end
  61. print"Done."
  62. fs.delete("startup")
  63. fs.delete("logic/")
  64. fs.delete("bin/")
  65. fs.delete("mem/")
  66. fs.delete("ACCOUNTS.F")
  67. --Exit
  68.  
  69. term.setCursorPos(1,12)
  70. sprint("Redworks has been successfully\nuninstalled from Terminal # " ..os.getComputerID()..".\nIf you were not satisfied with our product,\nplease stop by our forums and explain why.")
  71. term.setCursorPos(1,17)
  72. write "Returning to the Main Menu"
  73. for n=1,10 do
  74. reading()
  75. end
  76. shell.run("disk/startup")
Add Comment
Please, Sign In to add comment