<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Defining an Environment Variable in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaa-p/10754854#M3928748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following GTL should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.vbscript&lt;/P&gt;&lt;P&gt;Dim wshShell&lt;/P&gt;&lt;P&gt;set wshShell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;ScriptResult=wshShell.ExpandEnvironmentStrings( "%USERPROFILE%" )&lt;/P&gt;&lt;P&gt;.endvbscript&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can alter as necessary into a normal VBScript or method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You do not need to define any environment variables in PD paths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Dec 2014 15:06:47 GMT</pubDate>
    <dc:creator>ChrisBaker</dc:creator>
    <dc:date>2014-12-09T15:06:47Z</dc:date>
    <item>
      <title>Defining an Environment Variable</title>
      <link>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaq-p/10754850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to user the standard Windows environment variable %USERPROFILE% in PD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do that, somehow it dosn't work for me ... I have tried to define it in the:&lt;/P&gt;&lt;P&gt;1. General Optios -&amp;gt; Variables as a new variable USERPROFILE&lt;/P&gt;&lt;P&gt;2. Use it in the Named Paths to reference f.e. extensions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most probably the syntax I'm unsing is a wrong one ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the syntax if I want to create a new variable and what's the syntax if I want to reuse one in the Named Paths .. f.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name Path Comment&lt;/P&gt;&lt;P&gt;_ICONS is defined as %USERPROFILE%\BPM\8 Icons\&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I would assume, I can somehowe reuse the standard windows variables like USERPROFILE etc.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rafal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 20:07:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaq-p/10754850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-12-01T20:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Defining an Environment Variable</title>
      <link>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaa-p/10754851#M3928745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 20:30:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaa-p/10754851#M3928745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-12-08T20:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Defining an Environment Variable</title>
      <link>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaa-p/10754852#M3928746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In PD help it says this about environment variables:&lt;/P&gt;&lt;P&gt;To use a variable in GTL (see &lt;CITE class="cite"&gt;Customizing and Extending PowerDesigner &amp;gt; Customizing Generation with GTL &lt;/CITE&gt;), prefix it with a dollar sign, and wrap it in percent signs. For example, &lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph"&gt;%$CMD%.&lt;/SAMP&gt;&lt;SAMP class="ph codeph"&gt;&lt;/SAMP&gt;&lt;SAMP class="ph codeph"&gt;Does this help?&lt;/SAMP&gt;&lt;SAMP class="ph codeph"&gt;&lt;/SAMP&gt;&lt;SAMP class="ph codeph"&gt;&lt;/SAMP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SAMP class="ph codeph"&gt;&lt;/SAMP&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 11:18:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaa-p/10754852#M3928746</guid>
      <dc:creator>GeorgeMcGeachie</dc:creator>
      <dc:date>2014-12-09T11:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Defining an Environment Variable</title>
      <link>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaa-p/10754853#M3928747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Georg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to use it in GTL is known... but I'm asking: how to use it in the Tools -&amp;gt; General Settings ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example, I want to define the _SHARED named path to point windows USERPROFILE ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 13:55:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaa-p/10754853#M3928747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-12-09T13:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Defining an Environment Variable</title>
      <link>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaa-p/10754854#M3928748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following GTL should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.vbscript&lt;/P&gt;&lt;P&gt;Dim wshShell&lt;/P&gt;&lt;P&gt;set wshShell = CreateObject("WScript.Shell")&lt;/P&gt;&lt;P&gt;ScriptResult=wshShell.ExpandEnvironmentStrings( "%USERPROFILE%" )&lt;/P&gt;&lt;P&gt;.endvbscript&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can alter as necessary into a normal VBScript or method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You do not need to define any environment variables in PD paths.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 15:06:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/defining-an-environment-variable/qaa-p/10754854#M3928748</guid>
      <dc:creator>ChrisBaker</dc:creator>
      <dc:date>2014-12-09T15:06:47Z</dc:date>
    </item>
  </channel>
</rss>

