So in the following configuration. Can I just copy it to notepad and save as a .bat file? and also how does the syntax work for the path following the
SPLUNK_MSI=%~dp0\network drive\path\splunk-4.1.5-85165-x86-release.msi
or is it
SPLUNK_MSI=\network drive\path\splunk-4.1.5-85165-x86-release.msi
Also, does this install the software so it's just a forwarder? I'm trying to figure a way to deploy this agent out to my Windows servers and they can forward to my Splunk server.
How do I point the servers to my splunk server?
I hope all these questions make sense. I plan to use SCCM to deploy this bat file.
****START CONFIG BELOW****
setlocal
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto b64
IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" goto b64
:b32
set SPLUNK_MSI=%~dp0\splunk-4.1.5-85165-x86-release.msi
goto endb6432
:b64
set SPLUNK_MSI=%~dp0\splunk-4.1.5-85165-x64-release.msi
:endb6432
if not defined ProgramFilesW6432 (
set LOC=%ProgramFiles%\Splunk
) else (
set LOC=%ProgramFilesW6432%\Splunk
)
msiexec.exe /i "%SPLUNK_MSI%" INSTALLDIR="%LOC%" LAUNCHSPLUNK=0 SPLUNK_APP="" /QUIET
xcopy "%~dp0\etc" "%LOC%\etc" /s /f /y
copy /y "%LOC%\etc\splunk-forwarder.license" "%LOC%\etc\splunk.license"
pushd "%LOC%\bin\"
splunk restart --accept-license --no-prompt --answer-yes
popd
endlocal
... View more