I’m trying to create a script to auto-generate the %USERNAME%/Spark folder, encrypt it, and then create the spark.properties file in it. The desired result is that when we install Spark to our users, we can also automatically set up their account for them (fill in the server name, etc.)
I’ve pretty much got it down but there is one bug that’s…bugging me. Once the folder and file are created, I log into spark. It fills in the username, server name, etc, logs in, and populates the contact list, but it won’t send out messages. It can receive them, but won’t send them out.
However, after logging out and logging back in it works perfectly fine.
So, there is something different about this initial log in and the second time. Does anyone have any idea what this could be/where it is located? Anyone else try scripting something like this before?
Here is the scripting code:
IF NOT EXIST “%userprofile%\Spark” goto :BUILDSPARK
goto :ENCRYPTSPARK:BUILDSPARK
mkdir “%userprofile%\Spark”
cipher.exe /E /S:“%userprofile%\Spark” /A
CD “%USERPROFILE%\Spark”
SET SPARKPREFS=“%USERPROFILE%\Spark\spark.properties”ECHO password= >> %SPARKPREFS%
ECHO timeDisplayed=true >> %SPARKPREFS%
ECHO offlineGroupVisible=true >> %SPARKPREFS%
ECHO notifyOnOnline=false >> %SPARKPREFS%
ECHO username=%USERNAME% >> %SPARKPREFS%
ECHO windowTakesFocus=false >> %SPARKPREFS%
ECHO toasterPopup=false >> %SPARKPREFS%
ECHO autoLoginEnabled=false >> %SPARKPREFS%
ECHO showHistory=true >> %SPARKPREFS%
ECHO checkForBeta=false >> %SPARKPREFS%
ECHO showEmptyGroups=false >> %SPARKPREFS%
ECHO tabsOnTop=true >> %SPARKPREFS%
ECHO notifyOnOffline=false >> %SPARKPREFS%
ECHO server=mychat >> %SPARKPREFS%
ECHO chatNotificationOn=true >> %SPARKPREFS%
ECHO passwordSaved=false >> %SPARKPREFS%
ECHO buzzEnabled=true >> %SPARKPREFS%
ECHO spellCheckerEnabled=true >> %SPARKPREFS%
ECHO defaultChatLengthTimeout=15 >> %SPARKPREFS%:ENCRYPTSPARK
cipher.exe /E /S:“%userprofile%\Spark” /A