I created a batch script for deploying the spark.properties file to all user profiles on a Windows machine. When the batch file is executed, it checks if the spark.properties file exists and if it doesn’t, it copies the file from C:\Program Files\Spark (you need to create your default spark.properties file there first) to the Spark folder in the user profile. It will also create the Spark folder in the user profile if it doesn’t exist. Then it launches Spark. If the file aleady exists in the user profile, it just launches Spark. Here’s the code. Save it as a .bat file.
REM ECHO OFF
echo.
:Check
If exist “%USERPROFILE%\Spark\spark.properties” goto Launch
If not errorlevel 1 goto Copy
Thanks for your input Todd. How would you simplify this? I am using 2.5.8 for my company because it is the latest production release. What changes after 2.5.8 that would cause this not to work?.. the location of the Spark user profile folder?
I believe the comment regarding this not working after 2.5.8 is because the spark.properties file is moving; “SVN version user’s profile path has been changed from \Username\Spark to \Username\Application Data\Spark (Windows XP) and \Username\AppData\Roaming\Spark (Windows Vista and 7).” (taken from http://www.igniterealtime.org/community/docs/DOC-1822 )