WaiYinParticipantApril 20, 2015 at 3:32 amPost count: 3
Is there a way to pass the variable $appName from into the XML file? We would like to customize the message for <ClosePrompt_Message> to show the application name but we don’t really want to hardcode the application name within the XML file.
Thanks in advance for the support. This had been a great tools for deploying software which required users attention.
Muhammad MashwaniKeymasterApril 20, 2015 at 6:39 pmPost count: 118
Look in the XML file at the following elements: Toolkit_TempPath, Toolkit_LogPath. They both reference variables defined in the toolkit itself.
If you look at the toolkit, you see that we read and expand the values of these elements using this method:
Do the same for your variable.
WaiYinParticipantApril 21, 2015 at 3:18 amPost count: 3
Thanks for the reply.
I review the code you mention and it seem to be passing value from XML to Toolkit. Probably my question was not clear earlier, sorry about that.
In the Deploy-Application.ps1, there is a variable $appName. This is the variable which i would like to pass it into XML so that Show-InstallationWelcome can display the application name when it is called via <ClosePrompt_Message>.
Thanks and regards
Muhammad MashwaniKeymasterApril 21, 2015 at 3:36 amPost count: 118
No, I think I understand what you’re trying to do.
Take one of the examples I mentioned above: the Toolkit_TempPath element in the XML file.
This element has a defautt value of: $envSystemDrive\Users\Public
$envSystemDrive is a variable defined in AppDeployToolkitMain.ps1. So you can use the same method we did for this variable to pass $appName to the XML file.
It does mean that you will have to modify this line in AppDeployToolkitMain.ps1
[string]$configClosePromptMessage = $xmlUIMessages.ClosePrompt_Message
[string]$configClosePromptMessage = $ExecutionContext.InvokeCommand.ExpandString($xmlUIMessages.ClosePrompt_Message)
You must be logged in to reply to this topic.