A new Flexera Community experience is coming on November 18th, click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Repackager - How to change "Automated Tests" rules that are evaluated?

In the AdminStudio Repackager when you edit a Repackager project and go to Repackaged Output -> Create Microsoft Windows Installer package, there is another setting called "Run Automated Tests on the package".



After you build the MSI package from the Repackager, an XML file is generated which logs the automated tests and fixes applied during the build process. One of tests adds a MsiSystemRebootPending <> "1" to the LaunchCondition table, as you can see in an excerpt of this log:




A Launch Condition was created that checks for a pending reboot before allowing an install to continue.The installation will launch even in the event that a system restart is pending.VistaTest.Resolve.RebootPendingLaunchConditionA Launch Condition was created that checks for a pending reboot before allowing an install to continue.A Launch Condition was created that checks for a pending reboot before allowing an install to continue.


Tests to see if there exists a Launch Condition that will prevent the install from continuing when a restart is pending.

TestHelpTopics\Reboot Pending Launch Condition.htm
The 'Reboot Pending Launch Condition' test ran, but did not detect any problems as the 'MsiRMFilesInUse' dialog is present in the MSI.
VistaTest.Perform.RebootPendingLaunchCondition
VistaTest.Resolve.RebootPendingLaunchCondition
The installation will launch even in the event that a system restart is pending.
A Launch Condition was created that checks for a pending reboot before allowing an install to continue.
A Launch Condition was created that checks for a pending reboot before allowing an install to continue.



How can I selectively disable this particular test from run without having to globally disable the "Run Automated Tests on the package" option? There is nothing mentioned about this in the AdminStudio help documentation.

i.e. Where does the Repackager obtain the master set of automated test rules from?

Interestingly enough, when you open the .ISM that's generated from the Repackager and then Build the MSI, the LaunchCondition is subsequently removed.

My preference would be for the Repackager to never put the LaunchCondition in, in the first place.
(6) Replies
Alpesh
By
Flexera Alumni
Hi,

There should be a PackageExpert folder under the AS Installation directory. In that folder, you will find few xml files, which basically drive these automated tests. You will need to edit these xml files, so that the tests do not run during the build from Repackager.

If you need more help with this, please contact support.

Thanks!
Alpesh wrote:
Hi,

There should be a PackageExpert folder under the AS Installation directory. In that folder, you will find few xml files, which basically drive these automated tests. You will need to edit these xml files, so that the tests do not run during the build from Repackager.

If you need more help with this, please contact support.

Thanks!


Thanks for the quick response. Found it under C:\Program Files (x86)\AdminStudio\2013\PackageExpert\Windows7Test.xml

For anyone using AdminStudio 2014, PackageExpert was removed in that version (but the "Run Automated Tests on the Package" checkbox is still seen in Repackager, though it's grayed-out).

For those using AdminStudio 2013 R2 or earlier, there are two .xml files that you'll want to edit:
%ProgramFiles(x86)%\AdminStudio\2013\PackageExpert\VistaTest.xml
%ProgramFiles(x86)%\AdminStudio\2013\PackageExpert\Windows7Test.xml

Open each of those .xml files and search for the line that begins with

At the end of the line, change selected="true" to selected="false"

So in the Windows7Test.xml file, the line should now look like:


And in the VistaTest.xml file, the line should now look like:
Evan Border wrote:
For anyone using AdminStudio 2014, PackageExpert was removed in that version (but the "Run Automated Tests on the Package" checkbox is still seen in Repackager, though it's grayed-out).



Thanks Evan,

Is it grayed-out but still enabled? Or grayed-out and disabled?

Also, are you able to answer how and why InstallShield removes that same LaunchCondition on build? In AdminStudio 2013 Professional Complete, if you run it through the Test Center, the automated fix is to put the LaunchCondition back in!
Refer to page 1761 of the user guide
https://www.microway.com.au/installshield/AS2013UserGuide.pdf
AaronTan wrote:
Thanks Evan,

Is it grayed-out but still enabled? Or grayed-out and disabled?

Also, are you able to answer how and why InstallShield removes that same LaunchCondition on build? In AdminStudio 2013 Professional Complete, if you run it through the Test Center, the automated fix is to put the LaunchCondition back in!
Refer to page 1761 of the user guide
https://www.microway.com.au/installshield/AS2013UserGuide.pdf


It's grayed-out and disabled:



InstallShield does not actually remove the LaunchCondition on build. What you are seeing is a result of how PackageExpert operated. PackageExpert acted upon the .msi package, not the .ism project. You were using InstallShield to build the .ism (which at no point ever contained the LaunchCondition) and it produced a .msi package that also did not contain a LaunchCondition. So your newly built .msi (sans LaunchCondition) overwrote the PackageExpert-manipulated .msi which had the LaunchCondition.

Also: If you check the build log, you may see a message that states that PackageExpert was removed:



You'll see this message if your Options.ini contains RunTests=Y under the [General] section:



You can get rid of that message by changing RunTests=Y to RunTests=N. You'll want to make that change in the copy of Options.ini located at %ProgramFiles(x86)%\AdminStudio\201X\Repackager\Options.ini so that it's the default value.
Ahh that would explain it! Thanks very much. Very enlightening.