[OnBeforeSetup]
	// Script to request and verify License key and/or (Dis)Agree to License 
	run.section(,AgreeToLicenseYorN);
	if(ClickedNo)
		type -b "Installation terminated.";
	return ClickedNo; // Returning value of 1 causes installation of OPK to terminate

[OnAfterSetup]
	// Script to create MyGroup Toolbar
	system.toolbar.createcategory("Samples\Programming\User Interface Development\MyGroup.INI");
	system.toolbar.create(MyGroup);
	%A=$General.UserDefinedGroupAdded;
	%B=$General.UserDefinedGroup;
	type.msgBox(MyGroup %A, %B);

	// Script to update menu for this session of Origin 
	run.file(CustomMenus.CNF);

	// Script to update menu for future sessions of Origin 
	ini.get.filename$="Origin.ini";
	%Z=ini.config.file1$;
	ini.config.file1$=%Z CustomMenus;
	return 0;

[AgreeToLicenseYorN]
	// Script to capture Yes or No response
	ClickedNo=1; // Preset to expect No answer which causes section to terminate

	type -n "Click Yes to agree or No to disagree with License.
(You must click Yes to continue with installation.)";

	ClickedNo=0;
	return 0;
	
	
 



