Description
Prerequisites
- Ensure you write a short, descriptive title after [Bug] above.
- Make sure to search for any existing issues before filing a new one.
- Verify you are able to reproduce the issue with the latest released version
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
- 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.
Environment data
OsName : Microsoft Windows 10 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsProductName : Windows 10 Enterprise
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : en-US
OsMuiLanguages : {en-US}
KeyboardLayout : en-US
TimeZone : (UTC-06:00) Central Time (US & Canada)
HyperVisorPresent : True
CsPartOfDomain : False
CsPCSystemType : Desktop
Host:
Version: 8.0.2
Architecture: x64
Commit: 1381d5ebd2
RID: win-x64
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.NETCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.Windows
Desktop.App]
Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.Windows
Desktop.App]
Microsoft.WindowsDesktop.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.Windows
Desktop.App]
Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.Windows
Desktop.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download