<?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 Unable to retrieve Username of Metadata Profile using vbscript in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-retrieve-Username-of-Metadata-Profile-using-vbscript/m-p/407266#M26144</link>
    <description>&lt;P&gt;I'm trying to capture the Username of Connections Profile via vbscript. Below is the code and the link where I referenced from :&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings12/298-2012.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings12/298-2012.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' force declaration of variables in VB Script&lt;BR /&gt;Option Explicit&lt;BR /&gt;Dim Application&lt;BR /&gt;' Create a new SAS Enterprise Guide automation session&lt;BR /&gt;Set Application = WScript.CreateObject("SASEGObjectModel.Application.7.1")&lt;BR /&gt;WScript.Echo Application.Name &amp;amp; ", Version: " &amp;amp; Application.Version&lt;BR /&gt;&lt;BR /&gt;' Discover the available profiles that are defined for the current user&lt;BR /&gt;Dim i&lt;BR /&gt;Dim oShell&lt;BR /&gt;Set oShell = CreateObject( "WScript.Shell" )&lt;BR /&gt;WScript.Echo "Metadata profiles available for " _&lt;BR /&gt;&amp;amp; oShell.ExpandEnvironmentStrings("%UserName%")&lt;BR /&gt;WScript.Echo "----------------------------------------"&lt;BR /&gt;For i = 0 to Application.Profiles.Count-1&lt;BR /&gt;&lt;STRONG&gt;WScript.Echo "Profile available: " _&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;amp; Application.Profiles.Item(i).Name _&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;amp; ", Host: " &amp;amp; Application.Profiles.Item(i).HostName _&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;amp; ", Port: " &amp;amp; Application.Profiles.Item(i).Port&lt;/STRONG&gt;&lt;BR /&gt;Next&lt;BR /&gt;Application.Quit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to retrieve&amp;nbsp;&lt;STRONG&gt;USER&amp;nbsp;&lt;/STRONG&gt;of the Profile as well? I've already tried something like Application.Profiles.Item(i).User or&amp;nbsp;&lt;SPAN&gt;Application.Profiles.Item(i).Username, but didn't get the desired result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please suggest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank You.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2017 20:55:01 GMT</pubDate>
    <dc:creator>diwakar_atwal</dc:creator>
    <dc:date>2017-10-25T20:55:01Z</dc:date>
    <item>
      <title>Unable to retrieve Username of Metadata Profile using vbscript</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-retrieve-Username-of-Metadata-Profile-using-vbscript/m-p/407266#M26144</link>
      <description>&lt;P&gt;I'm trying to capture the Username of Connections Profile via vbscript. Below is the code and the link where I referenced from :&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings12/298-2012.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings12/298-2012.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;' force declaration of variables in VB Script&lt;BR /&gt;Option Explicit&lt;BR /&gt;Dim Application&lt;BR /&gt;' Create a new SAS Enterprise Guide automation session&lt;BR /&gt;Set Application = WScript.CreateObject("SASEGObjectModel.Application.7.1")&lt;BR /&gt;WScript.Echo Application.Name &amp;amp; ", Version: " &amp;amp; Application.Version&lt;BR /&gt;&lt;BR /&gt;' Discover the available profiles that are defined for the current user&lt;BR /&gt;Dim i&lt;BR /&gt;Dim oShell&lt;BR /&gt;Set oShell = CreateObject( "WScript.Shell" )&lt;BR /&gt;WScript.Echo "Metadata profiles available for " _&lt;BR /&gt;&amp;amp; oShell.ExpandEnvironmentStrings("%UserName%")&lt;BR /&gt;WScript.Echo "----------------------------------------"&lt;BR /&gt;For i = 0 to Application.Profiles.Count-1&lt;BR /&gt;&lt;STRONG&gt;WScript.Echo "Profile available: " _&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;amp; Application.Profiles.Item(i).Name _&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;amp; ", Host: " &amp;amp; Application.Profiles.Item(i).HostName _&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;amp; ", Port: " &amp;amp; Application.Profiles.Item(i).Port&lt;/STRONG&gt;&lt;BR /&gt;Next&lt;BR /&gt;Application.Quit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to retrieve&amp;nbsp;&lt;STRONG&gt;USER&amp;nbsp;&lt;/STRONG&gt;of the Profile as well? I've already tried something like Application.Profiles.Item(i).User or&amp;nbsp;&lt;SPAN&gt;Application.Profiles.Item(i).Username, but didn't get the desired result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please suggest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank You.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 20:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-retrieve-Username-of-Metadata-Profile-using-vbscript/m-p/407266#M26144</guid>
      <dc:creator>diwakar_atwal</dc:creator>
      <dc:date>2017-10-25T20:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to retrieve Username of Metadata Profile using vbscript</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-retrieve-Username-of-Metadata-Profile-using-vbscript/m-p/596343#M34925</link>
      <description>I use &amp;amp;SYSUSERID&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Oct 2019 18:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Unable-to-retrieve-Username-of-Metadata-Profile-using-vbscript/m-p/596343#M34925</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2019-10-14T18:34:51Z</dc:date>
    </item>
  </channel>
</rss>

