Dynamic variables do not resolve properly when run from within a batch file.
Many single commands can be run directly from the Application Launcher object. However, there are occasions when more complex operations must be performed and the need arises to run a batch file instead of simple commands. Dynamic variables that were created for use with ScriptLogic and Desktop Authority cannot be resolved from within a batch file, which sometimes creates a dilemna in circumstances that necessitate the use of both a batch file and the use of dynamic variables.
Use batch file parameters inside of the batch file that correlate to parameters defined on the arguments field of the Application Launcher element.
Example: In the example batch file below, the "%1" parameter will be populated by the first argument (or switch) in the arguments field.
@Echo off
CLSEcho %1
Md %1
Exit
If this batch file is executed using Apples as the argument (C:\file.bat Apples), then the result will be that the word "Apples" will be echoed to the screen and a directory named "Apples" will be created.
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center