Removed unused variable and changed the search for the installation directory. Use Sys.executable_name instead of Sys.argv.(0).