/build/static/layout/Breadcrumb_cap_w.png

How can I set up, ComputerName must contain "xxx" (3-4 specific letters/numbers) as a PREREQ within an MSI.

I have an app that we want to push out to only a subset of machines, but currently they do not have them categorized, or in groups.  So in the past they ran a VBScript that contained a "ComputerName" must contain and then had 3-4 specific variables, to distinguish the specific computer subset, say "TRN", or "VIR2" or "VMIT" in order for the VB script to kick off the MSI.  I got all the Reg key adds and icon replacements, etc, out of the VB script and embedded into the MSI, now I am trying to come up with a way to add a similar ComputerName Check within the MSI, and was unsuccessful at putting the VBScript as a Custom Action, to run before app install launch, so I was trying to add the Name Query within the LaunchCondition found on the General Information Page, it has it's own little drop down boxes giving you options to build a statement but everything I have tried so far has failed, can anyone assist with the correct syntax here?


This has been answered Thanks, I love the variety of answers.


0 Comments   [ + ] Show comments

Answers (2)

Posted by: Hobbsy 5 years ago
Red Belt
1
You can probably set up and use a regex function, probably most sensibly to make the machines containing the text a member of a label that is then the target of the script. So something like Machine name matches REGEX : TRN|VIR2|VMIT
Posted by: rad33k 5 years ago
Fourth Degree Brown Belt
0
EDIT: Hobbsy's suggestion to filter it out on the distribution level is much better solution.
-----------------------------------------------------------------------------------------------------------------------------

According to the Conditional Statement Syntax it should be something like this:
ComputerName >< "TRN" OR ComputerName >< "VIR2" OR ComputerName >< " VMIT"
ERROR! Computer name must containĀ  "TRN", "VIR2" or "VMIT".
ComputerName << "TRN" OR ComputerName << "VIR2" OR ComputerName << " VMIT"
ERROR! Computer name must start with "TRN", "VIR2" or "VMIT".
LaunchCondition table:


Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ