A new Flexera Community experience is coming on November 25th. Click here for more information.
is there an variable for $MSIProductCodeRegExPattern if I want Adminstudio to pull this into my powershell template like it does with the variables below if not is there a way to set it so it does
[string]$appVendor = '{appVendor}'
[string]$appName = '{appName}'
[string]$appVersion = '{appVersion}'
[string]$appArch = '{appArch}'
[string]$appLang = '{appLang}'
[string]$appScriptDate = '{appScriptDate}'
‎Sep 11, 2022 08:41 PM
I think you are probably referring to the $MSIProductCodeRegExPattern internal variable in the PowerShell App Deployment Toolkit that contain a regex pattern that matches an MSI product code; is that right?
Based on https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/blob/master/Sources/BetaToolkit/AppDeployToolkitMain.ps1#L327, I believe this variable in the toolkit contains the following constant value:
[string]$MSIProductCodeRegExPattern = '^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$'
You could include this statement directly in your script if you didn't have direct access to variables from the AppDeployToolkitMain.ps1 script itself.
‎Sep 13, 2022 09:02 PM
Hey Chris yea I was looking at that last week but yea something like when we import into Adminstudio I want it to set that variable value like it does the other values below having the product code available that way would be super helpful
[string]$appVersion = '6.50.0102'
[string]$appArch = 'X64'
[string]$appLang = 'English (United States)'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
‎Sep 13, 2022 11:32 PM - edited ‎Sep 14, 2022 12:19 AM
I don't believe there is a way to have the actual MSI product code of a package inserted into a PowerShell script like can be done with the "{app*}" magic patterns.
‎Sep 14, 2022 01:35 AM
As you mentioned in your post, currently AdminStudio supports setting the value for only the following variables while wrapping:
[string]$appVendor = '{appVendor}'
[string]$appName = '{appName}'
[string]$appVersion = '{appVersion}'
[string]$appArch = '{appArch}'
[string]$appLang = '{appLang}'
[string]$appScriptDate = '{appScriptDate}'
I see that you have already posted an idea in our Ideas portal requesting for additional variables like the MSI Product Code to be set while wrapping: https://flexerasfdc.ideas.aha.io/ideas/ADM-I-87.
Considering our currently planned features and enhancements, we will see how soon can we add your requested enhancement to our product backlog.
Thank you for your feedback, appreciate it!
‎Sep 14, 2022 02:28 AM