You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Win10 VMware VM. I converted a couple v3 scripts that had string variables similar to built in variables (all listed under AppScriptAuthor) , such as [string]$MSIName1 = 'MSI_Name', etc.
The built in variables are the only variables to show up in the converted v4 script. 2nd problem, is none of these extra or custom variables in the head of the old v3 script are set to the new switch, down in the sections of the script. Ex: #MSIName1 should be converted to $adtSession.MSIName1, but the variable shows up like this, $MSIName1. My scripts can contain up to 18 custom variables (as I really only had to file data in the variables and rarely touch the script. I had if statements thoughout the different sections that used the custom variables at the head, and would even use them in the fuctions, such as $InstallTime in the line for Show-InstallationProgress. That variable is there in the line, without the new formatting, but it is also missing in the head of the script as the custom variables were stripped out.
Steps to reproduce
I installed the latest ADT toolkit in a powershell console and also installed the Tools modules as of 1-11-25
I ran Convert-ADTDeployment and converted a template v.3.10.2 script and later a full blown app script
The invoke-AppDeployToolkit.ps1 in each case were missing all the custom variables at the head and inside the pre, install, post, etc. sections, the custom variables were lacking the new format form.
Currently it only converts known variables plus the code blocks within the main If statement. But I will look into adding any unknown variables outside of here also.
Thanks DanGough, I work with other techs who also use added variables in the V3 Variables Declaration section at the head of the script, or V3, the APp Variables section.
These are just a bit of the added variables I have added to our templates.
[String]$appScriptAuthor = ''
[string]$MSIName1 = 'MSI_Name'
[string]$MSTName1 = 'MST_Name'
[string]$EXEName = 'Name_of_EXE-Here'
etc.
All of these variables means I can put Install time (for the dialog), Parameters for MSI, Exe, uninstall details, etc.
This lets us fill out a package doc and copy and paste into the variable section and not touch the body of the script.
Just giving you an idea how we use the variables.
If the install is an engineering install script, we may also use ADT functions to grab app installed details and create functions per the app we are dealing with, possible in all the sections of the script. All of the added or custom variables missing from the head appear unaltered in the script and converted over OK, so for now, I will make sure and add our custom variables back into the head of the converted script.
I appreciate your help or thinking about letting us see the added custom variables carried over with the conversion from V3 to v4 process.
Prerequisites
PSAppDeployToolkit.Tools version
0.2.2
PSAppDeployToolkit version
4.04
Describe the bug
Win10 VMware VM. I converted a couple v3 scripts that had string variables similar to built in variables (all listed under AppScriptAuthor) , such as [string]$MSIName1 = 'MSI_Name', etc.
The built in variables are the only variables to show up in the converted v4 script. 2nd problem, is none of these extra or custom variables in the head of the old v3 script are set to the new switch, down in the sections of the script. Ex: #MSIName1 should be converted to $adtSession.MSIName1, but the variable shows up like this, $MSIName1. My scripts can contain up to 18 custom variables (as I really only had to file data in the variables and rarely touch the script. I had if statements thoughout the different sections that used the custom variables at the head, and would even use them in the fuctions, such as $InstallTime in the line for Show-InstallationProgress. That variable is there in the line, without the new formatting, but it is also missing in the head of the script as the custom variables were stripped out.
Steps to reproduce
Environment data
The text was updated successfully, but these errors were encountered: