Deploy - Windows Server

So, we’'ve pushed out 1.1.4 using the above script to add setting to settings.xml, but that seems to have changed now to spark.properties, which is also not complete. Is there documentation as to where all the settings are stored now?

I was successfully able to feed the spark.properties with usable values with Willcox’'s script with little editing.

dcartwright, some things you may want to try:

1.open cmd window

type echo %userprofile% to make sure that environment variable echoes your profile.

2.make sure there is no current spark.properties (or settings.xml…) file before running this. The script will exit if it finds one.

3.It also exits if it does NOT find “%ProgramFiles%\Spark\Spark.exe”. Which is the default location for spark. so if you chose a different path for it… try setting above line to that path.

Sample of the new script:

IF NOT EXIST “%ProgramFiles%\Spark\Spark.exe” GOTO END

IF EXIST “%USERPROFILE%\Spark\spark.properties” GOTO END

mkdir “%USERPROFILE%\Spark”

SET SPARKPREFS="%USERPROFILE%\Spark\spark.properties"

ECHO #Spark Settings >> %SPARKPREFS%

ECHO #Tue Oct 17 16:38:23 CDT 2006 >> %SPARKPREFS%

ECHO server=my.server.net >> %SPARKPREFS%

ECHO windowTakesFocus=false >> %SPARKPREFS%

…and so forth…

:END

Spark 2.0.3 (previous versions may apply) has moved from settings.xml to spark.properties

I use login.bat for user’'s profile Logon script. In that script I have my other functions and at the end add the following line:

server\sysvol\domain.com\scripts\setspark.bat

and in setspark.bat I have the following from Willcox’‘s batch script to fit my client needs (may not be perfect, I’'m not a programmer):

================================================================================ =====

@echo off

IF NOT EXIST “%ProgramFiles%\Spark\Spark.exe” GOTO INSTALL

IF EXIST “%USERPROFILE%\Spark\spark.properties” GOTO END

ECHO.

ECHO Setting up new Spark user profile - Please wait!

mkdir “%USERPROFILE%\Spark”

SET SPARKPREFS="%USERPROFILE%\Spark\spark.properties"

ECHO server=spark.server.com >> %SPARKPREFS%

ECHO windowTakesFocus=false >> %SPARKPREFS%

ECHO spellCheckerEnabled=true >> %SPARKPREFS%

ECHO passwordSaved=true >> %SPARKPREFS%

ECHO username=%USERNAME% >> %SPARKPREFS%

ECHO showHistory=true >> %SPARKPREFS%

ECHO lastUpdateCheck= >> %SPARKPREFS%

ECHO defaultChatLengthTimeout=300 >> %SPARKPREFS%

ECHO autoLoginEnabled=false >> %SPARKPREFS%

ECHO chatNotificationOn=true >> %SPARKPREFS%

ECHO timeDisplayed=true >> %SPARKPREFS%

ECHO password=== >> %SPARKPREFS%

ECHO showEmptyGroups=false >> %SPARKPREFS%

ECHO toasterPopup=false >> %SPARKPREFS%

:INSTALL

ECHO.

ECHO Installing Spark Enterprise Instant Messaging client - Please wait!

IF EXIST “%ProgramFiles%\Spark\spark.exe” GOTO END

path\spark_2_0_3_online.exe -q

ECHO Done!

GOTO END

:END

================================================================================ =====

I ended up ditching the GPO and custom MSI effort due to simplicity of the batch script in my small business environment. I may ditch Spark for Pandion if problems continue and spark becomes more bloated.

batch looks good.

Will probably use it myself.

Couple additions:

ECHO #%DATE% %TIME% >> %SPARKPREFS%

at the start… just for reference

:PROFILE

Label before the profile. Then “goto PROFILE” after install.


@echo off

IF NOT EXIST “%ProgramFiles%\Spark\Spark.exe” GOTO INSTALL

IF EXIST “%USERPROFILE%\Spark\spark.properties” GOTO END

:PROFILE

ECHO.

ECHO Setting up new Spark user profile - Please wait!

mkdir “%USERPROFILE%\Spark”

SET SPARKPREFS="%USERPROFILE%\Spark\spark.properties"

ECHO #Spark Settings >> %SPARKPREFS%

ECHO # %DATE% %TIME% >> %SPARKPREFS%

ECHO server=my.server.net >> %SPARKPREFS%

ECHO windowTakesFocus=false >> %SPARKPREFS%

ECHO spellCheckerEnabled=true >> %SPARKPREFS%

ECHO passwordSaved=true >> %SPARKPREFS%

ECHO username=%USERNAME% >> %SPARKPREFS%

ECHO showHistory=true >> %SPARKPREFS%

ECHO lastUpdateCheck=1161120226218 >> %SPARKPREFS%

ECHO defaultChatLengthTimeout=15 >> %SPARKPREFS%

ECHO autoLoginEnabled=true >> %SPARKPREFS%

ECHO chatNotificationOn=true >> %SPARKPREFS%

ECHO timeDisplayed=true >> %SPARKPREFS%

ECHO password= >> %SPARKPREFS%

ECHO showEmptyGroups=false >> %SPARKPREFS%

ECHO toasterPopup=false >> %SPARKPREFS%

:INSTALL

ECHO.

ECHO Installing Spark Instant Messaging client - Please

wait!

IF EXIST “%ProgramFiles%\Spark\spark.exe” GOTO END

path\spark_2_0_3_online.exe -q

ECHO.

ECHO Done!

GOTO PROFILE

:END

Very nice additions to the script. Thanks!

I’'ve decided to leverage GPO again, but not for MSI purposes. I created another GPO called “Spark Client Download” and set the following params. This way I have a little more control over whom the setspark.bat is applied to.


User Configuration > Windows Settings > Scripts (Logon/Logoff)

Logon > Add >
server\sysvol\domain.com\scripts\setspark.bat (typed full path)

Script Params: <blank>

Hit ok and applied the GPO to my test group of Sparklers.

And used the following setting in the same GPO to show/hide the CMD window during logon. I like it to show so end-users can see soemthing happening and don’'t freak.

User Configuration > Administrative Templates > System > Scripts > Run logon scripts visible = enabled


When everything is functioning correctly I’'ll apply it to my JabberAccess group containing all the users that have access to logon to Wildfire.

Then made some more “fail safe” changes to the setspark.bat including your previous suggestions.


@echo off

IF NOT EXIST “%ProgramFiles%\Spark\Spark.exe” GOTO INSTALL

IF EXIST “%ProgramFiles%\Spark\Spark.exe” GOTO PROFILE

:PROFILE

IF EXIST “%USERPROFILE%\Spark\spark.properties” GOTO END

ECHO.

ECHO Setting up new Spark user profile - Please wait!

IF NOT EXIST “%USERPROFILE%\Spark” GOTO MD

IF EXIST “%USERPROFILE%\Spark” GOTO SETSPARK

:MD

MKDIR “%USERPROFILE%\Spark”

GOTO SETSPARK

:SETSPARK

SET SPARKPREFS="%USERPROFILE%\Spark\spark.properties"

ECHO #Spark Settings >> %SPARKPREFS%

ECHO #%DATE% %TIME% >> %SPARKPREFS%

ECHO server=spark.domain.com >> %SPARKPREFS%

ECHO windowTakesFocus=false >> %SPARKPREFS%

ECHO spellCheckerEnabled=true >> %SPARKPREFS%

ECHO passwordSaved=true >> %SPARKPREFS%

ECHO username=%USERNAME% >> %SPARKPREFS%

ECHO showHistory=true >> %SPARKPREFS%

ECHO lastUpdateCheck= >> %SPARKPREFS%

ECHO defaultChatLengthTimeout=300 >> %SPARKPREFS%

ECHO autoLoginEnabled=false >> %SPARKPREFS%

ECHO chatNotificationOn=true >> %SPARKPREFS%

ECHO timeDisplayed=true >> %SPARKPREFS%

ECHO password=== >> %SPARKPREFS%

ECHO showEmptyGroups=false >> %SPARKPREFS%

ECHO toasterPopup=false >> %SPARKPREFS%

GOTO END

:INSTALL

ECHO.

ECHO Installing Spark Enterprise Instant Messaging client - Please wait!

IF EXIST “%ProgramFiles%\Spark\Spark.exe” GOTO PROFILE

<path>\spark_2_0_3_online.exe -q

ECHO.

ECHO Done!

IF NOT EXIST “%USERPROFILE%\Spark\spark.properties” GOTO PROFILE

GOTO END

:END


Enjoy! Comments/suggestions welcome!

If you’'re not using MS GPMC - http://www.microsoft.com/downloads/details.aspx?FamilyId=0A6D4C24-8CBD-4B35-9272 -DD3CBFC81887&displaylang=en git it!

Message was edited by: dcartwright

I like it, even if it’‘s bloated (with the failsafes :P). I still think it’‘s easy to follow line by line , and filesize with this script is NOT an issue. The other thing I’‘d like to do is check for version 1.1.4, because about 50 PCs or so have that on right now… I’'ll get back to ya when I get there. But the problem I face now is that I was planning on deploying this via computer configuration because users do not have install rights. I feel dumb now… but I think I can split the script into “install spark.bat” for computer configuration and “setupspark.bat” for user configuration.

it2000,

I’'m confused,

could you elaborate on why using a GPO would cause a problem with spark writing to the registry? is the install user-specific? Also, what does the spark installer do then? besides copying the files?

Hi,

a GPO could simply deny that a users adds registry keys. I have no idea what Spark does if the installation has problems.

LG

We use MSI here to deploy to ~40 user by GPO. Work really well.

I wrap up a new MSI Almost every release,as it’'s easy to do a snapshot with WinINSTALL LE, available on the Windows 2000 CD in valueadd dir.

The spark installation is very simple, so the snapshot is straight forward, and the cleannning is easy to do. I hack it up a bit by changing the only (1) reg key: spark.exe in HKCU\software\microsoft\windows\run to HKLM\software\microsoft\windows\run. This way I can install by machine, as all user use spark anyway. Drawback: The snapshot winINSTALL create isn’‘t compressed in a cab. it’'s really a network copy of the Program files folder.

have a look

http://web.netrevolution.com/gbeloin/spark202.msi

how to make it work:

You’'ll need a spark 2.0.2 offline installation or compatible (same files)

Create a directory “Program files” along the msi.

Copy your C:\program files\spark\ directory in there.

(dunno if you can foul the MSI like that though…)

Post two different batch files in GPO…

one is a startup script (with admin rights for the install)

and the other is a login script (to setup the preferences you want)

startup script also adds a VERSION folder and sets the version in there… this way it is easy to push new clients as they come (with a simple check for existence)

STARTUP SCRIPT:

@echo off

:CHECK

:: You’'ll change this as text file as new versions are deployed… this is the simply check

IF EXIST “%ProgramFiles%\Spark\Version\Spark_2_0_4.txt” GOTO END

:INSTALL

CLS

ECHO.

ECHO Installing/Upgrading Spark Instant Messaging client - Please wait!

:: Put your file location here

SERVER\FILELOCATION\Spark_2_0_4.exe -q

:VERSIONSET

:: This is where the VERSION CHECK is configured… change version numbers accourdingly

CD %PROGRAMFILES%\Spark

IF NOT EXIST “%PROGRAMFILES%\Spark\Version” mkdir Version

cd version

echo Version: Spark_2_0_4 > Spark_2_0_4.txt

:END

LOGON SCRIPT:

@echo Off

:CHECK

IF EXIST “%USERPROFILE%\Spark\spark.properties” GOTO END

:PROFILE

CLS

ECHO.

ECHO Setting up new Spark user profile - Please wait!

IF NOT EXIST “%USERPROFILE%\Spark” mkdir “%USERPROFILE%\Spark”

CD “%USERPROFILE%\Spark”

SET SPARKPREFS="%USERPROFILE%\Spark\spark.properties"

::INSERT SERVER NAME BELOW

ECHO server=SERVERNAME!!! >> %SPARKPREFS%

ECHO idleTime=5 >> %SPARKPREFS%

ECHO windowTakesFocus=false >> %SPARKPREFS%

ECHO spellCheckerEnabled=true >> %SPARKPREFS%

ECHO passwordSaved=true >> %SPARKPREFS%

ECHO username=%USERNAME% >> %SPARKPREFS%

ECHO showHistory=true >> %SPARKPREFS%

ECHO lastUpdateCheck= >> %SPARKPREFS%

ECHO defaultChatLengthTimeout=300 >> %SPARKPREFS%

ECHO autoLoginEnabled=true >> %SPARKPREFS%

ECHO chatNotificationOn=true >> %SPARKPREFS%

ECHO timeDisplayed=true >> %SPARKPREFS%

ECHO showEmptyGroups=false >> %SPARKPREFS%

ECHO toasterPopup=true >> %SPARKPREFS%

ECHO startOnStartup=true %SPARKPREFS%

ECHO startHidden=true %SPARKPREFS%

:END

Version checking is a great idea! Thanks!

I’'ve moved my install process to GPO MSI again. Does anyone else have an issue with Spark showing up in the add/remove program list multiple times?

hi, I tried the above batch script and it didn’‘t work, the creation of the proprieties file was ok, but it didn’‘t install (startup/computer settings), today the 2.0.5 msi was released, the problem is that version is without java, when I try to deploy java it ask’'s users for admin rights. whats the best solution for now to install automatically spark on every station?

Why not deploy Java as a separate MSI? I do - and use MST to configure it.

http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/install-ms i.html

That way I know all the computers on the network have the latest version of Java.

Incidentally, I have integrated the scripts and they work perfectly - the original MSI didn’‘t seem to work for me, and the spark.properties file couldn’‘t be prepopulated with the user’'s details, although the script allowed it. I think that making a spark “extension” which prepopulated using the Windows Logon details (as I use the LDAP system) then it would be perfect!

David

Camocas: Did you confirm the computer/users have security access to the shared folder path where the installers reside?

I keep mine in a Software directory that is accessible by everyone, but not everyone has permission to install.

Yes make sure your install file is located in a publicly readable folder…

Also when you setup your GPO make sure you reside it in the Computers section… under startup scripts. Could you be putting it in the login scripts by accident?

Also make sure you are propagating it correctly with the apply this GPO check mark.

Script works beautifully here… also, if you show your scripts on startup put a pause in and verify each step to make sure it doesn’‘t error out, and if it does… you’'ll see what step it was broke at. (remove echo off if needed)

-Tim

The spark installation is located in a folder which is readable by everyone, the GPO is applied, I have created two batch scripts has mention in this threat, the LOG ON scripts works fine but the START UP script doesn’'t, the first batch script (see bellow) was added under computers, startup:

STARTUP:

@echo off

IF EXIST “%ProgramFiles%\Spark\Version\Spark_2_0_4.txt” GOTO END

CLS

ECHO.

ECHO Installing/Upgrading Spark Instant Messaging client - Please wait!

FILESERVER\SHARED\Spark_2_0_5.exe -q

CD %PROGRAMFILES%\Spark

IF NOT EXIST “%PROGRAMFILES%\Spark\Version” mkdir Version

cd version

echo Version: Spark_2_0_4 > Spark_2_0_4.txt

The logon script (bellow) was added under users :: log on script, this script works perfectly, it creates the file.

LOG ON:

@echo Off

IF EXIST “%USERPROFILE%\Spark\spark.properties” GOTO END

CLS

ECHO.

ECHO Setting up new Spark user profile - Please wait!

IF NOT EXIST “%USERPROFILE%\Spark” mkdir “%USERPROFILE%\Spark”

CD “%USERPROFILE%\Spark”

SET SPARKPREFS="%USERPROFILE%\Spark\spark.properties"

::INSERT SERVER NAME BELOW

ECHO server=SERVERNAME!!! >> %SPARKPREFS%

ECHO idleTime=5 >> %SPARKPREFS%

ECHO windowTakesFocus=false >> %SPARKPREFS%

ECHO spellCheckerEnabled=true >> %SPARKPREFS%

ECHO passwordSaved=true >> %SPARKPREFS%

ECHO username=%USERNAME% >> %SPARKPREFS%

ECHO showHistory=true >> %SPARKPREFS%

ECHO lastUpdateCheck= >> %SPARKPREFS%

ECHO defaultChatLengthTimeout=300 >> %SPARKPREFS%

ECHO autoLoginEnabled=true >> %SPARKPREFS%

ECHO chatNotificationOn=true >> %SPARKPREFS%

ECHO timeDisplayed=true >> %SPARKPREFS%

ECHO showEmptyGroups=false >> %SPARKPREFS%

ECHO toasterPopup=true >> %SPARKPREFS%

ECHO startOnStartup=true %SPARKPREFS%

ECHO startHidden=true %SPARKPREFS%

Ok…

With the rough version checking you are going to want to change the version stamp with each version upgrade.

Right now it has 2.0.4 version checking and you need to change that for all of the to 2.0.5 (the file should already be in place for the last version so the new version will be skipped unless you put the new check in place)

Basically what it does is create a folder under %program files%\spark\ called Version and inserts a text file into it.

It then checks for that file on startup… if it is there it skips the install, if it is not… it installs.

If you leave the old version call in there it will check for the old version text file and then skip.

(NOTE: if you want to force a reinstall on a machine… just delete the text file and when it sees that it is not there it will reinstall)

Below is the revised code you should use:

STARTUP:

@echo off

IF EXIST “%ProgramFiles%\Spark\Version\Spark_2_0_5.txt” GOTO END

CLS

ECHO.

ECHO Installing/Upgrading Spark Instant Messaging client - Please wait!

FILESERVER\SHARED\Spark_2_0_5.exe -q

CD %PROGRAMFILES%\Spark

IF NOT EXIST “%PROGRAMFILES%\Spark\Version” mkdir Version

cd version

echo Version: Spark_2_0_5 > Spark_2_0_5.txt

Right now our process involves 2 seperate scripts (startup and logon in a GPO), as others above have done as well. This has worked well for us:

Startup script:

@echo off

SET SERVER=
server\

SET PATH=%SERVER%software$\Spark\spark_2_0_4_online.exe

REM *** File below exists as of version 2-something; since all older versions are 1.1.4 this works well ***

IF EXIST “%ProgramFiles%\Spark\starter.exe” goto :DONE

:INSTALL

ECHO.

ECHO *** Installing Spark Instant Messaging client - Please wait!

“%PATH%” -q

ECHO.

ECHO *** Done!

REM *** This runs sleep.exe, a prog to wait given amount of seconds; i do this so people see it’'s done installing… if they care.

%SERVER%shared\sleep 3

goto :EOF

:DONE

ECHO.

ECHO *** Already Installed

%SERVER%shared\sleep 3

Logon Script:

@echo off

REM I set variables up here so you do not have to find them in your script should you want to change them; except for spark profile settings of course

SET SPARKPREFS="%USERPROFILE%\Spark\spark.properties"

SET IMSERVER=WILDFIRE

SET SERVER=
guidance\

REM *** These variables set notification options to let me know if somoene tries to set up spark w/o having it installed ***

SET PC2NOTIFY=SFLETCHALL

SET NOW=%DATE% %TIME%

SET PATH2NOTIFY=%SERVER%shared\NOTIFY\spark.txt

SET NOTIFYTEXT=At %NOW% %COMPUTERNAME% as %USERNAME% does not have Spark

IF NOT EXIST “%ProgramFiles%\Spark\Spark.exe” GOTO :NOTINSTALLED

IF NOT EXIST “%ProgramFiles%\Spark\starter.exe” GOTO :NOTUPDATED

IF EXIST “%USERPROFILE%\Spark\spark.properties” GOTO :DONE

ECHO.

ECHO *** Setting up new Spark user profile - Please wait!

mkdir “%USERPROFILE%\Spark”

ECHO #Spark Settings>> %SPARKPREFS%

ECHO #%NOW%>> %SPARKPREFS%

ECHO idleOn=true>> %SPARKPREFS%

ECHO server=%IMSERVER%>> %SPARKPREFS%

ECHO windowTakesFocus=false>> %SPARKPREFS%

ECHO spellCheckerEnabled=false>> %SPARKPREFS%

ECHO passwordSaved=false>> %SPARKPREFS%

ECHO username=%USERNAME%>> %SPARKPREFS%

ECHO showHistory=true>> %SPARKPREFS%

ECHO lastUpdateCheck=1161120226218>> %SPARKPREFS%

ECHO defaultChatLengthTimeout=15>> %SPARKPREFS%

ECHO autoLoginEnabled=false>> %SPARKPREFS%

ECHO chatNotificationOn=true>> %SPARKPREFS%

ECHO timeDisplayed=true>> %SPARKPREFS%

ECHO password===>> %SPARKPREFS%

ECHO showEmptyGroups=true>> %SPARKPREFS%

ECHO toasterPopup=false>> %SPARKPREFS%

ECHO timeout=10>> %SPARKPREFS%

ECHO startOnStartup=false>> %SPARKPREFS%

ECHO startHidden=true>> %SPARKPREFS%

ECHO fileTransferTimeout=1>> %SPARKPREFS%

ECHO *** DONE

%SERVER%shared\sleep 3

GOTO :EOF

:NOTINSTALLED

net send %PC2NOTIFY% %NOTIFYTEXT% at all

ECHO %NOTIFYTEXT% at all>> %SERVER%shared\NOTIFY\spark.txt

GOTO :EOF

:NOTUPDATED

net send %PC2NOTIFY% %NOTIFYTEXT% updated

ECHO %NOTIFYTEXT% updated>> %PATH%shared\NOTIFY\spark.txt

GOTO :EOF

:DONE

ECHO.

ECHO *** Already Set Up

REM %SERVER%shared\sleep 3

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.

k.i.s.s.