Thanks for the solution! I was saving values to a file beforehand so I just reused that code. Below is my pseudocode;
if (fileValue > 0)
doComputations();
// doComputations() was successful
initializeAdvancedInstaller();
if (AdvancedInstaller.TrialLeft == 0) {
discardResults();
fileValue = 0 ...
FOLLOW US
Get the latest news in Application Packaging