Creating Custom Scripts within Login AM by Using Custom Variables
The power of Login AM is the dynamic design. When I create a component I am able to fill in the settings on the top level of the component. These values can be used in Linked Values throughout the complete component from a Dynconf to a Citrix Published application.
What often is forgotten is that the name and value is used as a system variable during execution of the component. This is very handy because this gives me the possibility to use these ‘custom’ variables inside a custom script.
In this example I am going to create a path from the variables SOURCEDIR and REVISION.
The easiest way to combine the SOURCEDIR and the REVISION is to create a PowerShell variable.
Then we need to call the system variables in the powershell script. This can be done by using the following command: $env:<VariableName>
In my example it will look like this:
Now we need to combine all parts.
$APPV_SourcePath = $env:SOURCEDIR + '\'+ $env:REVISION
The command write-host plus the variable is a nice way to check what the outcome is during scripting. The result will be display in your PowerShell window.
Some useful command for showing all system variables:
I hope this information helps you in creating custom scripts within Login AM.
Start using Login VSI today
Our industry-standard software is built to help you avoid problems, lower costs and improve performance. Request a Quote or get your free Trial below, and benefit from our award-winning services.
About the company Login VSI
The company Login VSI provides end-user performance insights for virtualized desktop and server-based computing environments. Enterprise IT departments use flagship product Login VSI (for load testing) and Login PI (for continuity testing) in all phases of their virtual desktop deployment—from planning to deployment to change management—to build and safeguard a good performance, a high availability, and (as a result) a good and consistent end-user experience. For more information about Login VSI or for a free test license contact us.