<?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: Why is my Windows batch file not being executed from my inputs.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85921#M17872</link>
    <description>&lt;P&gt;I updated my script stanza by copying and pasting the line you provided, but it still is not launching.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Apr 2011 13:40:14 GMT</pubDate>
    <dc:creator>jstockton</dc:creator>
    <dc:date>2011-04-21T13:40:14Z</dc:date>
    <item>
      <title>Why is my Windows batch file not being executed from my inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85919#M17870</link>
      <description>&lt;P&gt;I created an App and in my inputs.conf have it calling a Windows batch file to execute an .exe, but the exe seems that it is not executed.  I have tried multiple things based on some of posts I found, and haven't gotten it to work yet.&lt;/P&gt;

&lt;P&gt;Here is what I currently have setup:&lt;BR /&gt;
     C:\Program Files\Splunk\etc\apps\LogViewer\bin is where my exe is that I want to run along with my batch file to run my exe.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  call "C:\Program Files\Splunk\etc\apps\LogViewer\bin\LogginDB.exe"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;C:\Program Files\Splunk\etc\apps\LogViewer\default\inputs.conf contains&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  [script:"C:\Program Files\Splunk\etc\apps\LogViewer\bin\LaunchLogging.bat"]
  disabled = 0 # change to true to start the input, requires restart
  host = SHE-STGSQLEXT1 # enter hostname here
  index = main
  interval = 30      #frequency to run the script
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My exe is written to output a text file so i know for sure that it is not running and if I run the batch file manually the output is created.&lt;/P&gt;

&lt;P&gt;Any one know what I am doing wrong?  &lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2011 02:40:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85919#M17870</guid>
      <dc:creator>jstockton</dc:creator>
      <dc:date>2011-04-21T02:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Windows batch file not being executed from my inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85920#M17871</link>
      <description>&lt;P&gt;I believe the issue is with your "script" stanza in inputs.conf.  The correct syntax is "script://".  Try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;## inputs.conf
[script://$SPLUNK_HOME\etc\apps\LogViewer\bin\LaunchLogging.bat]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Apr 2011 03:16:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85920#M17871</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-04-21T03:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Windows batch file not being executed from my inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85921#M17872</link>
      <description>&lt;P&gt;I updated my script stanza by copying and pasting the line you provided, but it still is not launching.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85921#M17872</guid>
      <dc:creator>jstockton</dc:creator>
      <dc:date>2011-04-21T13:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Windows batch file not being executed from my inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85922#M17873</link>
      <description>&lt;P&gt;One other thing, I put my .bat file in C:\Program Files\Splunk\bin\scripts and added a Data Input to this file and everything is working as I expected.&lt;/P&gt;

&lt;P&gt;I'm assuming that $SPLUNK_HOME is a system variable.  I checked my system variables and did not see that on so I added it and put the value as C:\Program Files\Splunk.  The path to Python is part of my path.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2011 13:51:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85922#M17873</guid>
      <dc:creator>jstockton</dc:creator>
      <dc:date>2011-04-21T13:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Windows batch file not being executed from my inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85923#M17874</link>
      <description>&lt;P&gt;Do you need a double backslash to indicat that you are not escape charachtering?&lt;BR /&gt;
I can't type it here as the preview removes the second backslash. but I beleive that that is the problem.....&lt;BR /&gt;
Hope that helps.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2011 16:26:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85923#M17874</guid>
      <dc:creator>donwant</dc:creator>
      <dc:date>2011-04-21T16:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Windows batch file not being executed from my inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85924#M17875</link>
      <description>&lt;P&gt;If it is working in $SPLUNK_HOME\bin\scripts, but not in $SPLUNK_HOME\etc\apps\&lt;YOUR_APP&gt;\bin this could be a file permissions issue.&lt;/YOUR_APP&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:28:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85924#M17875</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2020-09-28T09:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Windows batch file not being executed from my inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85925#M17876</link>
      <description>&lt;P&gt;You do not have to escape slashes in inputs.conf file path specifiers.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2011 16:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85925#M17876</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-04-21T16:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my Windows batch file not being executed from my inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85926#M17877</link>
      <description>&lt;P&gt;I was able to resolve it.  I think it is a combination of a syntax errors.  In my first post I have a couple of lines in my inputs.conf where I have a comment after setting a property:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      disabled = 0 # change to true to start the input, requires restart
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I removed those comments and also tried your original suggestion of changing the value of my script path in my script stanza.  I now have it set to the value of:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      [script://$SPLUNK_HOME\etc\apps\LogViewer\bin\LaunchLogging.bat]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2011 18:08:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-Windows-batch-file-not-being-executed-from-my-inputs/m-p/85926#M17877</guid>
      <dc:creator>jstockton</dc:creator>
      <dc:date>2011-04-21T18:08:26Z</dc:date>
    </item>
  </channel>
</rss>

