<?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: trying to read a script out using UF in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/trying-to-read-a-script-out-using-UF/m-p/696029#M115535</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the response&lt;/P&gt;&lt;P&gt;i tried something similar to this . I tried to fetch %userprofile% and saved it to a variable and then call the variable as part of another command but it didnt help. Can you give an example&lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2024 15:39:20 GMT</pubDate>
    <dc:creator>arunkuriakose</dc:creator>
    <dc:date>2024-08-12T15:39:20Z</dc:date>
    <item>
      <title>trying to read a script out using UF</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/trying-to-read-a-script-out-using-UF/m-p/695988#M115528</link>
      <description>&lt;P&gt;Hi Splunkers&lt;/P&gt;&lt;P&gt;The idea is to pull any new file creations on a particular folder inside C:\users\&amp;lt;username&amp;gt;\appdata\local\somefolder&lt;/P&gt;&lt;P&gt;i wrote a batch script to pull and index this data. its working but the issue is i cannot define a token for users.&lt;/P&gt;&lt;P&gt;eg: In script if i mention the path as C:\users\&amp;lt;user1&amp;gt;\appdata\local the batch script will run as expected an data will be indexed to splunk but if i mention the user1 as %userprofile% or %localappdata% the batch script is not running. How to resolve this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 12:27:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/trying-to-read-a-script-out-using-UF/m-p/695988#M115528</guid>
      <dc:creator>arunkuriakose</dc:creator>
      <dc:date>2024-08-12T12:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: trying to read a script out using UF</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/trying-to-read-a-script-out-using-UF/m-p/695991#M115529</link>
      <description>&lt;P&gt;You can expect Splunk to use environmental variables only in the cases documented in conf file specs. So if you want to use a variable's value you need to resolve the variable yourself within the script.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 13:14:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/trying-to-read-a-script-out-using-UF/m-p/695991#M115529</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-08-12T13:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: trying to read a script out using UF</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/trying-to-read-a-script-out-using-UF/m-p/696029#M115535</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the response&lt;/P&gt;&lt;P&gt;i tried something similar to this . I tried to fetch %userprofile% and saved it to a variable and then call the variable as part of another command but it didnt help. Can you give an example&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 15:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/trying-to-read-a-script-out-using-UF/m-p/696029#M115535</guid>
      <dc:creator>arunkuriakose</dc:creator>
      <dc:date>2024-08-12T15:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: trying to read a script out using UF</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/trying-to-read-a-script-out-using-UF/m-p/696357#M115571</link>
      <description>&lt;P&gt;You simply have to use the variable any way is appropriate for the programming/scripting solution you're using - powershell, python, whatever.&lt;/P&gt;&lt;P&gt;One important thing though - %USERPROFILE% in case of a scripted input run by splunkd.exe will at best point to Splunk Forwarder's technical user's profile. Is that what you want? Why not simply use the forwarder's SPLUNK_HOME variable then?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 08:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/trying-to-read-a-script-out-using-UF/m-p/696357#M115571</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-08-15T08:13:20Z</dc:date>
    </item>
  </channel>
</rss>

