{"id":8027,"date":"2026-10-17T11:41:12","date_gmt":"2026-10-17T08:41:12","guid":{"rendered":"https:\/\/support.withsecure.com\/?post_type=support_article&#038;p=8027"},"modified":"2026-10-17T11:41:12","modified_gmt":"2026-10-17T08:41:12","slug":"elements-firewall-rule-doesnt-work-if-a-windows-user-environment-variable-is-used-in-the-application-path-field","status":"publish","type":"support_article","link":"https:\/\/support.withsecure.com\/de\/support-articles\/elements-firewall-rule-doesnt-work-if-a-windows-user-environment-variable-is-used-in-the-application-path-field\/","title":{"rendered":"Elements Firewall rule doesn&#8217;t work if a Windows User environment variable is used in the application path field"},"content":{"rendered":"<h3>Issue:<\/h3>\n<p>When creating a firewall rules to Windows Defender firewall with the Elements Endpoint Protection profile&#39;s firewall feature, the firewall rule doesn&#39;t work if a Windows User environment variable is used in the application path field.<\/p>\n<p>For example, the firewall rule doesn&#39;t work when trying to use %LOCALAPPDATA% %HOMEPATH% %TEMP% %USERPROFILE% %OneDrive% in the application path field.\u00a0<\/p>\n<h3>Resolution:<\/h3>\n<div style=\"text-align: start;\">User Environment Variables are not supported by Windows Firewall. Microsoft documentation has the following entry:<\/p>\n<p><strong>IMPORTANT:<\/strong> Do not use environment variable strings that resolve only in the context of a certain user (for example, %USERPROFILE%). When these strings are evaluated by the service at runtime, the service is not running in the context of the user. The use of these strings can produce unexpected results.<\/p>\n<p>Only limited System Environment Variables are supported by Windows Defender Firewall.\u00a0\u00a0<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We are trying to get our Ms Teams client to be able to communicate through the Computer Protection Firewall. The issue is that the Teams application is installed in the user directory and it doesent seem that we are able to use variables when creating rules. We have now have a somewhat working workaround, and that is by using this Powershell script:<br \/>\nhttps:\/\/docs.microsoft.com\/en-us\/microsoftteams\/get-clients#sample-powershell-script&#8212;inbound-firewall-rule<\/p>\n<p>The issue now is that this script work<\/p>\n","protected":false},"template":"","support_article_product":[99],"class_list":["post-8027","support_article","type-support_article","status-publish","hentry"],"acf":{"source_foreign_id":"000005828","source_version":1,"source_system":"salesforce","source_date_updated":"2026-10-17 08:41:12","import_hash":"60f4009bf75a852ca2c5ee9642f2ee02ddd7e552","vanilla_article_id":"","vanilla_url":"","vanilla_kb_id":"","vanilla_category_id":"","machine_translated":false,"reactions_helpful_yes":"","reactions_helpful_no":""},"_links":{"self":[{"href":"https:\/\/support.withsecure.com\/de\/wp-json\/wp\/v2\/support_article\/8027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.withsecure.com\/de\/wp-json\/wp\/v2\/support_article"}],"about":[{"href":"https:\/\/support.withsecure.com\/de\/wp-json\/wp\/v2\/types\/support_article"}],"wp:attachment":[{"href":"https:\/\/support.withsecure.com\/de\/wp-json\/wp\/v2\/media?parent=8027"}],"wp:term":[{"taxonomy":"support_article_product","embeddable":true,"href":"https:\/\/support.withsecure.com\/de\/wp-json\/wp\/v2\/support_article_product?post=8027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}