<?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>topic Re: variable not working in argument in shortcut in Dynamic Environment Manager</title>
    <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291631#M5235</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hoi &lt;B&gt;Raymond&lt;/B&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand the use case, but still don't get how exactly you're setting it up, sorry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How exactly do you create that env var? Does it show up correctly in the output of &lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt;&lt;/SPAN&gt; in a command prompt?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Apr 2020 18:23:17 GMT</pubDate>
    <dc:creator>DEMdev</dc:creator>
    <dc:date>2020-04-01T18:23:17Z</dc:date>
    <item>
      <title>variable not working in argument in shortcut</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291628#M5232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe someone here can help us with the following issue,&lt;/P&gt;&lt;P&gt;We create an environment variable in DEM to see the if a machine is test, production etc.&lt;/P&gt;&lt;P&gt;When we use this variable in the shortcut it works like a charm but when we try to use the same variable in an argument it does not seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone else seen this issue before??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 06:35:50 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291628#M5232</guid>
      <dc:creator>Ray_handels</dc:creator>
      <dc:date>2020-04-01T06:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: variable not working in argument in shortcut</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291629#M5233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;B&gt;Raymond&lt;/B&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How exactly are you configuring the environment variable, and how are you referencing it in "an argument"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 07:57:57 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291629#M5233</guid>
      <dc:creator>DEMdev</dc:creator>
      <dc:date>2020-04-01T07:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: variable not working in argument in shortcut</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291630#M5234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;B&gt;DEMdev&lt;/B&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What we do now is that we create a variable (I will call it TEST for reference) that changes a file location for a share based on the last letter of a computer name. &lt;/P&gt;&lt;P&gt;For example if the computer name ends with Q the path is \\server\pathQ and so on.&lt;/P&gt;&lt;P&gt;This way we can create 1 shortcut for multiple file locations that we need to start an application with.&lt;/P&gt;&lt;P&gt;This works quite well with the shortcuts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case the actual application is on the local machine itself but we then try to use that %TEST% variable in the argument to access the application on the specific share and it does not seem to set the value correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 15:14:34 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291630#M5234</guid>
      <dc:creator>Ray_handels</dc:creator>
      <dc:date>2020-04-01T15:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: variable not working in argument in shortcut</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291631#M5235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hoi &lt;B&gt;Raymond&lt;/B&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand the use case, but still don't get how exactly you're setting it up, sorry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How exactly do you create that env var? Does it show up correctly in the output of &lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt;&lt;/SPAN&gt; in a command prompt?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 18:23:17 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291631#M5235</guid>
      <dc:creator>DEMdev</dc:creator>
      <dc:date>2020-04-01T18:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: variable not working in argument in shortcut</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291632#M5236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey &lt;B&gt;DEMdev&lt;/B&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try and do my best explaining how we set this up &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;. Withput screenshots it's kinda hard but will do my best &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We use DEM Enviornment variables for this set up.&lt;/P&gt;&lt;P&gt;We have a few different options for filling up the value %TEST%.&lt;/P&gt;&lt;P&gt;So for example&lt;/P&gt;&lt;P&gt;%TEST% is \\servername\folderX is computername ends with X&lt;/P&gt;&lt;P&gt;%TEST% is \\servername\folderY if computername ends with Y&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you look at the DEM setup the variable is TEST and the value is \\servername\folderY and the condition is computer name ends with Y.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i then go to a machine where computername ends with Y and I run the %TEST% in&amp;nbsp; a command prompt it shows \\servername\folderY as the value for that variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I making a little bit of sense here? I hope I explained it a little bit better.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 06:10:21 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291632#M5236</guid>
      <dc:creator>Ray_handels</dc:creator>
      <dc:date>2020-04-02T06:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: variable not working in argument in shortcut</title>
      <link>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291633#M5237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;B&gt;Raymond&lt;/B&gt;,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;If i then go to a machine where computername ends with Y and I run the %TEST% in&amp;nbsp; a command prompt it shows \\servername\folderY as the value for that variable.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So that means that DEM correctly sets the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you mean that the DEM agent does not expand env vars references in the &lt;EM&gt;Arguments&lt;/EM&gt; field of a shortcut definition, that is correct. However, Windows does that when you invoke the shortcut.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is, if I define a shortcut as follows:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/18735iAA21A41EBB7E148B/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;it will behave like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/18734iE883480C255B65E8/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although &lt;EM&gt;Arguments&lt;/EM&gt; is not "pre-expanded" by the DEM agent (unlike the shortcut name, for instance), Windows does that while launching the shortcut's target. As the &lt;EM&gt;Command line&lt;/EM&gt; column in Task Manager shows, it's not Notepad.exe itself that is performing the expansion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2020 12:58:14 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/Dynamic-Environment-Manager/variable-not-working-in-argument-in-shortcut/m-p/2291633#M5237</guid>
      <dc:creator>DEMdev</dc:creator>
      <dc:date>2020-04-02T12:58:14Z</dc:date>
    </item>
  </channel>
</rss>

