In case any of you guys are interested, and/or use KIX scripting instead of just BAT files, here’‘s what we’'re now using (I posted the first batch file in this thread):
? " "
? “Checking if Spark is already installed on this computer . . .”
$sSparkVersion = “C:\Program Files\Spark\version.2-0-2”
IF NOT EXIST($sSparkVersion)
? " Spark is not installed or wrong version, attempting to install . . ."
IF NOT EXIST(“X:\NUL”)
? " X drive not present, reconnecting . . ."
SHELL “%COMSPEC% /C NET USE X:
fileserver\software /user:@USERID > NUL”
ELSE
? " X drive already present."
ENDIF
? " Ending Spark task . . ."
SHELL ‘‘TASKKILL /F /IM spark.exe /T’’
SLEEP 5
? " Deleting Spark directory . . ."
SHELL ‘’%COMSPEC% /C RMDIR “C:\Program Files\Spark” /S /Q’’
? " Re-creating Spark directory . . ."
SHELL ‘’%COMSPEC% /C MKDIR “C:\Program Files\Spark”’’
? " Copying files . . ."
SHELL ‘’%COMSPEC% /C XCOPY “X:\Spark” “C:\Program Files\Spark” /H /E /C /K /V /I /Q /Z /Y’’
IF EXIST(“C:\Program Files\Spark\Spark.exe”)
? " Spark was successfully installed."
SHELL ‘’%COMSPEC% /C ECHO installed > “$sSparkVersion”’’
ELSE
? " ERROR: Spark was NOT successfully installed!"
ENDIF
ELSE
? " Spark is already installed."
ENDIF
? “Spark installation check complete.”
? " "
? “______________________________________________________________________________ __”
? " "
? “Checking if Spark config is present for @USERID . . .”
$sWildfireServer = “serveraddress”
$sWildfirePort = “5222”
$sWildfireDownloadDir = “H:
IM Downloads”
$sWildfirePrefs = “%USERPROFILE%\Spark\spark.properties”
$sSparkConfigVersion = “%USERPROFILE%\Spark\configured.4”
IF EXIST(“C:\Program Files\Spark\Spark.exe”)
? " Spark is installed."
IF NOT EXIST($sSparkConfigVersion)
? " Spark is installed, settings are not present or wrong version. Configuring . . ."
SHELL ‘’%COMSPEC% /C RMDIR “%USERPROFILE%\Spark” /S /Q’’
SHELL ‘’%COMSPEC% /C MKDIR “%USERPROFILE%\Spark”’’
SHELL ‘’%COMSPEC% /C MKDIR “$sWildfireDownloadDir”’’
SHELL ‘’%COMSPEC% /C ECHO #Saving Spark Settings> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO #Fri Nov 10 17:00:50 EST 2006>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO password===>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO idleTime=^1>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO idleOn=true>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO timeDisplayed=true>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO lastUpdateCheck=^1155709946428>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO username=%USERNAME%>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO windowTakesFocus=false>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO toasterPopup=true>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO timeout=^5>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO xmppPort=$sWildfirePort>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO autoLoginEnabled=false>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO showHistory=true>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO showEmptyGroups=false>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO server=$sWildfireServer>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO chatNotificationOn=true>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO downloadDirectory=$sWildfireDownloadDir>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO startHidden=false>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO fileTransferTimeout=^1>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO passwordSaved=true>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO spellCheckerEnabled=true>> “$sWildfirePrefs”’’
SHELL ‘’%COMSPEC% /C ECHO defaultChatLengthTimeout=^15>> “$sWildfirePrefs”’’
? " Copying avatar . . ."
SHELL ‘’%COMSPEC% /C NET USE L:
logonserver\share /user:%USERNAME% /persistent:no > NUL’’
SHELL ‘’%COMSPEC% /C XCOPY “L:%USERNAME%.jpg” “%USERPROFILE%\Spark” /H /E /C /K /V /I /Q /Z /Y’’
SHELL ‘’%COMSPEC% /C NET USE L: /delete /yes > NUL’’
? " Avatar copied."
? " Copying Spark shortcut . . ."
SHELL ‘’%COMSPEC% /C XCOPY “X:\logon\Spark.lnk” “%USERPROFILE%\Desktop” /H /C /K /V /I /Q /Z /Y’’
? " Spark shortcut copied."
? " Setting Spark to run at startup . . ."
$RC=WriteValue(“HKEY_CURRENT_USER\Software\Microsoft\Windows \CurrentVersion\Run”, “Spark”, “C:\Program Files\Spark\Spark.exe”, “REG_SZ”)
? " Spark should run at startup."
SHELL ‘’%COMSPEC% /C ECHO 1 > “$sSparkConfigVersion”’’
? “Spark config check complete.”
IF EXIST($sWildfirePrefs)
? " Spark was successfully configured."
ELSE
? " ERROR: Spark was NOT successfully configured!"
ENDIF
ELSE
? " Spark configuration already complete."
ENDIF
ELSE
? " Spark is not installed."
ENDIF
? “Spark config check complete.”
? " "
? “______________________________________________________________________________ __”
This allows us to easily upgrade Spark (we install it on one machine, and then copy that over to a share; then we change the version number in the script). We can also change the configuration separately at any time should we desire, by using a very basic version numbering for that (configured.1, configured.2, etc). This has worked perfectly for us and with the exception of the registry entry, possible share or disk writing permissions should work for most.