-
Notifications
You must be signed in to change notification settings - Fork 1
[Bug] All custom variables are stripped from app Variables v3 to v4 #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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. |
I did resign myself to creating a new variable section, similar to v3 format, separate and below the ADTSession variables declared. The reason for creating a separate variable section, is the conversion process, just copies over the literal format of the "extra" variables I created and used. Example, I created the variable such as $MSIName and $MSTNAME right above the Pre-Install section. |
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: