There are ways to do what you want, but it's not a very good design. Better is:
  • Make the installs / uninstalls functions.
  • Call the script to load the function.
  • Call the functions when you need them