SlideShare a Scribd company logo
1 of 14
Environment Variables
Ivanti Workspace Control Training
Marcel Venema
v1.2, February 2018
Environment Variables in IWC
‒ You can set Environment Variables in your Workspace
Control session.
‒ Environment Variables can be set based on various
types of Access Control like Identity, Location and
Devices, Date and Time, Workspace Containers.
Environment Variables
‒ Via Composition – Environment Variables
‒ Can be set on Global or Application level
Environment Variables
‒ Set context based on Identity, Location and Devices,
Workspace Control, Connection State.
‒ ... can be used at other places in Workspace Control like
notifications, files and folders, messages, etc...
Order of Execution Workspace Control
‒ Environment variables
‒ Drive and port mappings
‒ Drive substitutes
‒ Printers
‒ User Registry Settings
‒ User Registry Policies
‒ User Home Directory actions
‒ User Profile Directory actions
‒ Folder synchronizations
‒ Execute Commands
‒ Automation tasks
‒ Linked actions
Order of execution Environment Variables
‒ Click on checkbox to change order of execution. Use
arrows to increase/decrease order.
IWC environment variables
Environment variable Description
%clientipadress% IP-adress of client. If server/workstation it will return the actual IP-adress. If RDS/XenApp
environment, it will return IP-adress of client. Example: 192.168.2.100
%clientname% Clientname. If server/workstation it will return the %computername%. If RDS/XenApp
environment, it will return name the client.
%deskpic% Filename of desktop wallpaper or logo. Example: CONTOSO_LOGO.JPG
%fullusername% Full username as entered in Active Directory displayname. Example: John doe
%lcid% Current Microsoft Locale ID. Example: 1033 (US English)
%pfappid% Application ID of current application. Example: 16
%rescustomresources% Filepath to RES-WM Custom Resources folder.
%reshomedrive% Drive letter of configured Workspace Control user home drive. See Files and Folders – User
Home Directory – Settings.
%respfdir% Filepath to Workspace Manager installation path.
Example: C:PROGRA~2RESSOF~1WORKSP~1
%resshell% Selected shell. MS = Windows shell, PF = legacy Workspace Manager Shell
%ressubprsnt% RES Subscriber present. Example: YES
%saverpic% Filename of screensaver image. Example: SCREENSAVER_CONTOSO.JPG
%usersid% User account security identifier. Example: S-1-5-21-1454471165-1004336348-1606980848-
5555
Windows built-in environment variables*
* Depends on Operating System version
Environment variable Description
%alluserprofile% Full path to common user profile folder. Example: C:ProgramData.
%appdata% Contains full path to application data for all users. This folder is used for application data that is
not user specific. Example: C:Users<username>AppDataRoaming
%computername% NETBIOS name of the workstation.
%homedrive% Drive letter which is mapped to the user home drive. Example: H:
%homepath%
%homeshare% Network UNC path of user home directory.
%localappdata%
%logonserver% Indicates which domain controller authenticated the client’s logon request
%os% Operating System. Will mostly show WIN_NT regardless of OS version.
%programdata% Full path to program data folder. Example: C:ProgramData
Windows built-in environment variables*
Environment variable Description
%programfiles% IP-adress of client. If server/workstation it will return the actual IP-adress. If RDS/XenApp
environment, it will return IP-adress of client. Example: 192.168.2.100
%programfiles(x86)%
%public%
%sessionname%
%systemdrive%
%systemroot%
%userdnsdomain%
%userdomain%
%username%
%userprofile%
%windir%
* Depends on Operating System version
Environment Variables Functions
‒ $adinfo(<property>)
Returns the value of a specific user property from AD. Example:
$adinfo(firstname).$adinfo(lastname)@%userdnsdomain% is often used to return
e-mail addresses.
Available properties: firstname, lastname, displayname, email, ouname, title, office,
department, phone, fax, company, street, pobox, city, state, postalcode, country,
webaddress, description, homedirectory, tshomedirectory.
‒ $usershellfolder(<folder>)
Returns the path to the specified Windows Explorer folder for the current user.
Example: $UserShellFolder(favorites) may return C:Documents and
Settings[USERNAME]Favorites.
Available user shell folders: appdata, desktop, favorites, nethood, personal,
printhood, programsmenu, recentfiles, sendto, startmenu, startupmenu, cache,
cookies, history, localappdata, mymusic, mypictures, myvideo, templates.
Environment Variables Functions
‒ $substring(%var%, start, length)
Returns a certain number of characters from the variable's value. Example:
$substring(%username%, 3, 4) takes 4 characters from the user name, starting with
the 3rd character. For the user name "Robert", the example would return the value
"bert".
‒ $uppercase(%var%) and $lowercase(%var%)
Convert the variable values to uppercase or lowercase. For example:
$uppercase(%username%) with the user name "RobertK" returns "ROBERTK", and
with $lowercase(%var%) it returns "robertk".
‒ $autocount(<minimumvalue>-<maximumvalue>)
Generates a number starting at the given minimum and increasing by 1 each time
a variable is set. When the given maximum is reached, the next time will start at
the given minimum again. For example, $autocount(5-10000) will start counting at
5 and go up to 10000; when 10000 is reached, the counter restarts at 5.
UserSettings variables
‒ Can only be used with UserSettings
‒ Cannot be used as environment variables
Environment
variable
Description
%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.
%programsmen
u%
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.
%userprofile% Contains the user profile
Environment
variable
Description
%appdata% Contains application data for all users. This folder is
used for application data that is not user specific.
%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.
Best Practices
‒ Environment variables are fast, flexible and easy to use. Use often
if applicable.
‒ Environment variables can be used in other IWC settings:
notifications, messages, files and folders, etc….
‒ Use Administrative note for your own
administration/documentation
‒ You can use environment variables in environment variables, like
%deskpic% = %customer%_%screenresolution%_%otap%.jpg
‒ Watch the order of execution when using environment variables in
environment variables.
Examples
‒ %fileserver%
Depending the physical location, the nearest file server will be set.
‒ %screenresolution%
Depending the screen resolution a value will be set which can be used with
%deskpic%, for example background_1920x1080.jpg.
‒ %DTAP%
Identifies Development, Test, Accepance or Production environment. Based on
Location and Devices.
‒ %msg_rdrives_%
Based on Language, the notification message for Removable Drive Security is set.

More Related Content

Similar to Workspace Control Environment Variables

1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docxtarifarmarie
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operationsgrim_radical
 
Managing the User Experience
Managing the User ExperienceManaging the User Experience
Managing the User ExperienceTimothy Sutton
 
16. Computer Systems Basic Software 2
16. Computer Systems   Basic Software 216. Computer Systems   Basic Software 2
16. Computer Systems Basic Software 2New Era University
 
2Windows Server Proposal for Dynamic SolarKelvin L.docx
2Windows Server Proposal for Dynamic SolarKelvin L.docx2Windows Server Proposal for Dynamic SolarKelvin L.docx
2Windows Server Proposal for Dynamic SolarKelvin L.docxtamicawaysmith
 
File character set converter
File character set converterFile character set converter
File character set converterDeepti Singh
 
File character set converter
File character set converterFile character set converter
File character set converterDeepti Singh
 
Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Robert Lemke
 
fuelOrigin.docx
fuelOrigin.docxfuelOrigin.docx
fuelOrigin.docxKanhaJi5
 
Vista Forensics
Vista ForensicsVista Forensics
Vista ForensicsCTIN
 
Sharepoint 2007 backup & restore
Sharepoint 2007 backup & restoreSharepoint 2007 backup & restore
Sharepoint 2007 backup & restoreDecatec
 

Similar to Workspace Control Environment Variables (20)

1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
1 CMPS 12M Data Structures Lab Lab Assignment 1 .docx
 
Iwatch tech 1
Iwatch tech 1Iwatch tech 1
Iwatch tech 1
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operations
 
Puppet quick start guide
Puppet quick start guidePuppet quick start guide
Puppet quick start guide
 
Operating system
Operating systemOperating system
Operating system
 
Lamp ppt
Lamp pptLamp ppt
Lamp ppt
 
Managing the User Experience
Managing the User ExperienceManaging the User Experience
Managing the User Experience
 
16. Computer Systems Basic Software 2
16. Computer Systems   Basic Software 216. Computer Systems   Basic Software 2
16. Computer Systems Basic Software 2
 
2Windows Server Proposal for Dynamic SolarKelvin L.docx
2Windows Server Proposal for Dynamic SolarKelvin L.docx2Windows Server Proposal for Dynamic SolarKelvin L.docx
2Windows Server Proposal for Dynamic SolarKelvin L.docx
 
File character set converter
File character set converterFile character set converter
File character set converter
 
File character set converter
File character set converterFile character set converter
File character set converter
 
Ch23 system administration
Ch23 system administration Ch23 system administration
Ch23 system administration
 
Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0
 
fuelOrigin.docx
fuelOrigin.docxfuelOrigin.docx
fuelOrigin.docx
 
SHELL PROGRAMMING
SHELL PROGRAMMINGSHELL PROGRAMMING
SHELL PROGRAMMING
 
Vista Forensics
Vista ForensicsVista Forensics
Vista Forensics
 
Sharepoint 2007 backup & restore
Sharepoint 2007 backup & restoreSharepoint 2007 backup & restore
Sharepoint 2007 backup & restore
 
Ch03
Ch03Ch03
Ch03
 
Ch03 system administration
Ch03 system administration Ch03 system administration
Ch03 system administration
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
 

More from marcelvenema

RESONE Workspace - Automate Administration
RESONE Workspace - Automate AdministrationRESONE Workspace - Automate Administration
RESONE Workspace - Automate Administrationmarcelvenema
 
Citrix XenDesktop Configuration Logging
Citrix XenDesktop Configuration LoggingCitrix XenDesktop Configuration Logging
Citrix XenDesktop Configuration Loggingmarcelvenema
 
5 tips using RES Automation Manager
5 tips using RES Automation Manager5 tips using RES Automation Manager
5 tips using RES Automation Managermarcelvenema
 
59 ways to publish an application v0.9
59 ways to publish an application v0.959 ways to publish an application v0.9
59 ways to publish an application v0.9marcelvenema
 
RES Wisdom 2009 training day2
RES Wisdom 2009 training day2RES Wisdom 2009 training day2
RES Wisdom 2009 training day2marcelvenema
 
RES Wisdom hands-on training
RES Wisdom hands-on trainingRES Wisdom hands-on training
RES Wisdom hands-on trainingmarcelvenema
 
Workshop XenDesktop4 day 1
Workshop XenDesktop4 day 1Workshop XenDesktop4 day 1
Workshop XenDesktop4 day 1marcelvenema
 

More from marcelvenema (7)

RESONE Workspace - Automate Administration
RESONE Workspace - Automate AdministrationRESONE Workspace - Automate Administration
RESONE Workspace - Automate Administration
 
Citrix XenDesktop Configuration Logging
Citrix XenDesktop Configuration LoggingCitrix XenDesktop Configuration Logging
Citrix XenDesktop Configuration Logging
 
5 tips using RES Automation Manager
5 tips using RES Automation Manager5 tips using RES Automation Manager
5 tips using RES Automation Manager
 
59 ways to publish an application v0.9
59 ways to publish an application v0.959 ways to publish an application v0.9
59 ways to publish an application v0.9
 
RES Wisdom 2009 training day2
RES Wisdom 2009 training day2RES Wisdom 2009 training day2
RES Wisdom 2009 training day2
 
RES Wisdom hands-on training
RES Wisdom hands-on trainingRES Wisdom hands-on training
RES Wisdom hands-on training
 
Workshop XenDesktop4 day 1
Workshop XenDesktop4 day 1Workshop XenDesktop4 day 1
Workshop XenDesktop4 day 1
 

Recently uploaded

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Recently uploaded (20)

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

Workspace Control Environment Variables

  • 1. Environment Variables Ivanti Workspace Control Training Marcel Venema v1.2, February 2018
  • 2. Environment Variables in IWC ‒ You can set Environment Variables in your Workspace Control session. ‒ Environment Variables can be set based on various types of Access Control like Identity, Location and Devices, Date and Time, Workspace Containers.
  • 3. Environment Variables ‒ Via Composition – Environment Variables ‒ Can be set on Global or Application level
  • 4. Environment Variables ‒ Set context based on Identity, Location and Devices, Workspace Control, Connection State. ‒ ... can be used at other places in Workspace Control like notifications, files and folders, messages, etc...
  • 5. Order of Execution Workspace Control ‒ Environment variables ‒ Drive and port mappings ‒ Drive substitutes ‒ Printers ‒ User Registry Settings ‒ User Registry Policies ‒ User Home Directory actions ‒ User Profile Directory actions ‒ Folder synchronizations ‒ Execute Commands ‒ Automation tasks ‒ Linked actions
  • 6. Order of execution Environment Variables ‒ Click on checkbox to change order of execution. Use arrows to increase/decrease order.
  • 7. IWC environment variables Environment variable Description %clientipadress% IP-adress of client. If server/workstation it will return the actual IP-adress. If RDS/XenApp environment, it will return IP-adress of client. Example: 192.168.2.100 %clientname% Clientname. If server/workstation it will return the %computername%. If RDS/XenApp environment, it will return name the client. %deskpic% Filename of desktop wallpaper or logo. Example: CONTOSO_LOGO.JPG %fullusername% Full username as entered in Active Directory displayname. Example: John doe %lcid% Current Microsoft Locale ID. Example: 1033 (US English) %pfappid% Application ID of current application. Example: 16 %rescustomresources% Filepath to RES-WM Custom Resources folder. %reshomedrive% Drive letter of configured Workspace Control user home drive. See Files and Folders – User Home Directory – Settings. %respfdir% Filepath to Workspace Manager installation path. Example: C:PROGRA~2RESSOF~1WORKSP~1 %resshell% Selected shell. MS = Windows shell, PF = legacy Workspace Manager Shell %ressubprsnt% RES Subscriber present. Example: YES %saverpic% Filename of screensaver image. Example: SCREENSAVER_CONTOSO.JPG %usersid% User account security identifier. Example: S-1-5-21-1454471165-1004336348-1606980848- 5555
  • 8. Windows built-in environment variables* * Depends on Operating System version Environment variable Description %alluserprofile% Full path to common user profile folder. Example: C:ProgramData. %appdata% Contains full path to application data for all users. This folder is used for application data that is not user specific. Example: C:Users<username>AppDataRoaming %computername% NETBIOS name of the workstation. %homedrive% Drive letter which is mapped to the user home drive. Example: H: %homepath% %homeshare% Network UNC path of user home directory. %localappdata% %logonserver% Indicates which domain controller authenticated the client’s logon request %os% Operating System. Will mostly show WIN_NT regardless of OS version. %programdata% Full path to program data folder. Example: C:ProgramData
  • 9. Windows built-in environment variables* Environment variable Description %programfiles% IP-adress of client. If server/workstation it will return the actual IP-adress. If RDS/XenApp environment, it will return IP-adress of client. Example: 192.168.2.100 %programfiles(x86)% %public% %sessionname% %systemdrive% %systemroot% %userdnsdomain% %userdomain% %username% %userprofile% %windir% * Depends on Operating System version
  • 10. Environment Variables Functions ‒ $adinfo(<property>) Returns the value of a specific user property from AD. Example: $adinfo(firstname).$adinfo(lastname)@%userdnsdomain% is often used to return e-mail addresses. Available properties: firstname, lastname, displayname, email, ouname, title, office, department, phone, fax, company, street, pobox, city, state, postalcode, country, webaddress, description, homedirectory, tshomedirectory. ‒ $usershellfolder(<folder>) Returns the path to the specified Windows Explorer folder for the current user. Example: $UserShellFolder(favorites) may return C:Documents and Settings[USERNAME]Favorites. Available user shell folders: appdata, desktop, favorites, nethood, personal, printhood, programsmenu, recentfiles, sendto, startmenu, startupmenu, cache, cookies, history, localappdata, mymusic, mypictures, myvideo, templates.
  • 11. Environment Variables Functions ‒ $substring(%var%, start, length) Returns a certain number of characters from the variable's value. Example: $substring(%username%, 3, 4) takes 4 characters from the user name, starting with the 3rd character. For the user name "Robert", the example would return the value "bert". ‒ $uppercase(%var%) and $lowercase(%var%) Convert the variable values to uppercase or lowercase. For example: $uppercase(%username%) with the user name "RobertK" returns "ROBERTK", and with $lowercase(%var%) it returns "robertk". ‒ $autocount(<minimumvalue>-<maximumvalue>) Generates a number starting at the given minimum and increasing by 1 each time a variable is set. When the given maximum is reached, the next time will start at the given minimum again. For example, $autocount(5-10000) will start counting at 5 and go up to 10000; when 10000 is reached, the counter restarts at 5.
  • 12. UserSettings variables ‒ Can only be used with UserSettings ‒ Cannot be used as environment variables Environment variable Description %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. %programsmen u% 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. %userprofile% Contains the user profile Environment variable Description %appdata% Contains application data for all users. This folder is used for application data that is not user specific. %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.
  • 13. Best Practices ‒ Environment variables are fast, flexible and easy to use. Use often if applicable. ‒ Environment variables can be used in other IWC settings: notifications, messages, files and folders, etc…. ‒ Use Administrative note for your own administration/documentation ‒ You can use environment variables in environment variables, like %deskpic% = %customer%_%screenresolution%_%otap%.jpg ‒ Watch the order of execution when using environment variables in environment variables.
  • 14. Examples ‒ %fileserver% Depending the physical location, the nearest file server will be set. ‒ %screenresolution% Depending the screen resolution a value will be set which can be used with %deskpic%, for example background_1920x1080.jpg. ‒ %DTAP% Identifies Development, Test, Accepance or Production environment. Based on Location and Devices. ‒ %msg_rdrives_% Based on Language, the notification message for Removable Drive Security is set.