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

Adminstudio PowerShell Variable

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}'

 

 

Labels (1)
4 Replies
ChrisG
Community Manager Community Manager
Community Manager

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.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)
0 Kudos

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'

 

0 Kudos

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.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)
0 Kudos
kmantagi
Level 7 Flexeran
Level 7 Flexeran

@clmoore479 

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!