I can run the .ps1 script and logic does what is expected but will not perform syntax correctly when running the .exe Posted script section, unable to figure out why the copy-item syntax is not copying the folders and files to the targeted locations using the .exe, however when using the .ps1 script works as expected.
##===============================================
## INSTALLATION
##*===============================================
[string]$installPhase = ‘Installation’
## Handle Zero-Config MSI Installations
If ($useDefaultMsi) {
[hashtable]$ExecuteDefaultMSISplat = @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
}
## <Perform Installation tasks here>
# New-Item -Path "C:\WorkflowEradication" -ItemType Directory
Copy-Item -Path '.\Files\WorkflowEradication' -Destination 'C:\' -Recurse
# Copy-Item -Path "$dirFiles\WorkflowEradication" -Destination "$envHomePath\" -Recurse -Force
wscript.exe "c:\workfloweradication\qmon\setvar.vbs"
Reg Import '.\Files\RegistryKeys\QMON.reg'