I believe the poster wants to be able to call this program from his script, to present the user with a window with a license/policy to read, and then make the user choose ACCEPT or DECLINE (cancel), and then read the return code from the program to know which choice the user made.