Working With the OS Environment
Working With the OS Environment
32 bit Apps on 64 & 32 bit Windows
Specifying the bmAppPath
for a 32 bit process should use the “Program Files (x86)” folder if the script is to be run on 64 bit versions of windows.
At runtime the bmAppPath
will be changed to use the “Program Files” folder rather than the “(x86)” one if the agent detects that it is running on a 32 bit version of windows.
See also the %ProgramFiles% environment variable.
Environment variables
The bmAppArgument
and bmAppPath
fields support expansion of windows environment variables.
E.g. if an app is installed under the user’s roaming profile in a folder called “App\app.exe” then the following path will locate it:
%AppData%\App\app.exe
Common Relevant Environment Variables
Variable | Meaning | Typical Value |
---|
%AppData% | User’s roaming profile folder. | C:\Users\<username>\AppData\Roaming |
%LocalAppData% | User’s local profile folder. | C:\Users\<username>\AppData\Local |
%ProgramData% | System folder for common app data. | C:\ProgramData |
%ProgramFiles% | Target app sepcific folder. Varies for 32 or 64 bit apps | 64 bit: C:\Program Files |
A full list of environment variables may be found at https://en.wikipedia.org/wiki/Environment_variable#Windows
Related Articles
Advanced Script Examples
Remote Desktop / Windows Credential Dialog /***************** * Remote desktop script (mstsc.exe, not windows 10 one) * * The Enc1 field on the user's bookmark contains the target server name:port * The users need to be told to fill this in. **** * ...
Introductory Script Example
This section describes a sample Windows application and shows how the My1Login desktop scripting language may be used to interact with it. This example is contrived, but it covers the features used by the majority of scripts. Sample Application ...
Introductory Script Example
This section describes a sample Windows application and shows how the My1Login desktop scripting language may be used to interact with it. This example is contrived, but it covers the features used by the majority of scripts. Sample Application ...
Process Management
Process Management Process Start and Identification The StartProcess and WaitProcess commands ensure that the script interacts with the correct windows app before running the main body of the script. The LaunchUrl command allows integration with web ...
Bookmark & Template Attributes
The Desktop Scripting Language supports reading values from the application’s desktop bookmark record and its associated template. These values are treated as string literals when used inside commands. Template values can support environment ...