Editors Note: I am in the process of breaking up this article into separate articles that deal with the individual topics to a deeper level. So far the RES Environment Variable Guide is available here. Everything else below this point should be considered an unrevised general hodgepodge of info in need of an overhaul.
This technote back from 2009 originally described the various environment variables, specific tags and special functions at your disposal within RES Workspace Manager. All the information provided below is available through the regular RES PowerFuse documentation, but has been combined here for quick reference and easy overview. At the end of the document, a detailed reference is provided for some of the described items.
Use of variables in Registry paths
The use of environment variables in registry key names, value names and profile folder and file names, are supported. For example, ”HKEY_CURRENT_USER\Software\Microsoft\Office\%OFFICE_VERSION%” is a valid registry path in the Workspace Manager registry editor. When environment variables are used, they will be dynamically processed both while saving and loading UserSettings. This enables an administrator to load UserSettings into a location which is different from the location from which they were saved. Of course this has the potential to go Fifty Shades of Haywire, but hey, it’s possible.
System Environment variables
An overview of these are now available in the Environment Variable Guide. The variables can be used directly in most Workspace Manager console fields or as input to WM functions, such as $substring(), $lowercase(), etc. Note there are some environment variables such as the PROCESSOR_* variables are seldom used for configuration of the user workspace.
Old variables, which aren’t variables anymore(!)
Way back in PowerFuse 2008 Service Release 5, the following list of variables were added. However, these are not available as environment variables anymore, and have been replaced by the $UserShellFolder() function.
The descriptions below were specified in the PF2008SR5 release notes. As of mid 2013, in Workspace Manager 2012 SR2, the following are not environment variables, but substitution tags in UserSettings running in Capture-Targeted mode, where they represent a given path in the profile to pick up files from. For example, lets say you want to pick up and store the users favorites. When you browse to the C:\Users\<username>\Favorites folder, it will automatically be replaced with the substitution tag %FAVORITES% as specified below. This allows Workspace Manager to pick up the folder no matter where it may possibly be redirected to, according to the UserShellFolder registry settings in HKCU
%cache% – Common repository for temporary Internet files.
%cookies% – Common repository for Internet cookies.
%desktop% – Stores file objects on the desktop.
%favorites% – Common repository for the user’s favorite items.
%history% – Common repository for Internet history items.
%localappdata% – Data repository for local (non roaming) applications.
%mymusic% – Common repository for music files.
%mypictures% – Common repository for image files.
%myvideo% – Common repository for video files.
%nethood% – Contains the link objects that may exist in the My Network Places folder.
%personal% – Stores a user’s common repository of documents.
%printhood% – Contains the link objects that can exist in the Printers folder.
%programsmenu% – Contains the user’s program groups (which are themselves file system directories).
%recentfiles% – Contains shortcuts to the user’s most recently used documents.
%sendto% – Contains Send To menu items.
%startmenu% – Contains Start menu items.
%startupmenu% – Corresponds to the user’s Startup program group.
%templates% – Common repository for document templates.
Under the User Context main node, select Languages to enable multilingual support in your Workspace Manager environment. This allows you to change the language used in the RES management console, but also to provide multilingual support to your users: they can select different languages for their Workspace Preferences and Start Menu. Multilingual support also allows you to configure applications (such as Microsoft Office) to use the preferred language of the user.
Multilingual support in WM is primarily based on LanguagePacks. By installing a LanguagePack, you can provide support in WM for the following languages: Danish, Dutch, English, Spanish, Finnish, French, German, Italian, Norwegian and Swedish. More languages may have been added at the time of writing. By mapping languages to a LanguagePack, you can present the end user with a choice of additional languages to those available in LanguagePacks.
How to enable multilingual support in RES Workspace Manager
- Download the LanguagePack from the RES Portal
- Install the LanguagePack on all WM Agents.
- Select Enable mapping of language to LanguagePack. This will show a list of available languages.
- Select a LanguagePack in the Installed LanguagePacks area.
- Select the language(s) that you want to map to this LanguagePack. The LCID code represents the identifier of the language in Microsoft Windows. All selected languages (LCID’s) will be available for the user.
- If applicable, change the MLS initial default language.
- To view an audit trail of changes, click .
- To create a Building Block of the settings, click .
- To create an Instant Report of the settings, click .
- Click Apply to apply the changes.
Example: If you highlight LanguagePack English and select the language Norwegian (Nynorsk), the variable %LCID% will contain the Windows identifier of Norwegian (Nynorsk). You can then use this variable to make changes in the registry, using language as access control. For example, if you change the registry using this variable, you can change the display language of Microsoft Office to Norwegian (Nynorsk). After you have mapped Norwegian (Nynorsk), the user can select Norwegian (Nynorsk) in his Workspace Preferences panel. After refreshing, RES Workspace Manager will show an English interface, whereas Microsoft Office will show the Norwegian (Nynorsk) interface.
Note: When enabling or disabling language mappings to a LanguagePack, the current language selection of the user in RES Workspace Manager will be reset to the MLS initial default language. When configuring registry settings at login and using selected language as Access Control, you can select the option Any language in the Language field. Language registry settings will be enforced when the RES Workspace Manager session is refreshed. All other registry settings will only be enforced when the user logs on. By selecting this option, you can enforce registry settings that are not related to a specific language or are based on the %LCID% variable during a refresh.
Tags are special strings which can be inserted into the parameters field of managed applications, defined in the Workspace Manager console. As I understand it, I can use these to build custom context menus using the filetype configuration under managed apps. I still need to create some working examples with these, as each time I’ve tried so far, I end up with egg on my face. In the meantime, the documentation says as follows:
$PF_IFA$ – Specifying this tag in a IFA (Instant File Association) commandline, inserts the doubleclicked file/mimetype
$PF_IFA_REPLACE$ – If this tag is used, the original main commandline from the app is not used. Use to specify an alternate app to launch the file extension.
$PASSWORD$ – Still figuring out if this is still available and how it works, where is it specified, in pf console or subscriber
In order to configure file associations, click the File Association tab on a managed application in WM. If more applications are associated with the same file types and commands, click the arrows to assign a priority. For example, WordPad can open simple .doc files, but Microsoft Word also registers to open this file type. If an application is at the top of the priority list for a certain file type and command, it will be used to handle the file type association upon double-click on the file type. If this application is not accessible to the user, the second application will be used, etc. You can also edit this priority in the Instant File Associations node of Configuration Management.
You can use “special file types”, when configuring Instant File Associations. These file types (mailto, http, ftp, nntp and news) are not really file types, but mimetypes, which determine what should happen for example, when the user clicks a mailto: link in Internet Explorer or an Internet URL in Microsoft Outlook.
You can indicate where the file name should be inserted in the command line when command line parameters are used, by using $PF_IFA$ in the application’s command line. For example, if you have configured Microsoft PowerPoint’s command line as /splash to suppress its splash screen and the user double-clicks a .ppt file (assuming you configured an Instant File Association for this application), PowerPoint will attempt to start with the command line /splash h:<file name>.ppt. This will fail, because PowerPoint requires the file name as first parameter.
To resolve this, enter $PF_IFA$ /splash as the application’s command line option. If the application is launched through an Instant File Association, the file name will no longer be appended to the application’s command line options, but instead will be inserted in the position indicated with $PF_IFA$. When the application is launched directly from the menu, the $PF_IFA$ text will be removed.
You can also use $PF_IFA_REPLACE$ to indicate that when an application is launched through an Instant File Association, the command line options that are configured for the application should not be used at all, but only the file name that is passed to the application through the Instant File Association.
Note that all the info below on functions is going out into a separate article later. Besides that, every function now has a RESpedia entry. For now here are links to the entries:
$adinfo(<name of AD attribute>)
$substring(string, offset, length)
$usershellfolder(<name of shellfolder to return>)