We have a number of items in our script that re-run every morning, as the script grows we're starting to experience extended time for it to complete.

These items are there because someone might login to another PC so the entries need applying.

Here's an example of an Office setting, we have about 15 of these
 Code:
; ### Outlook Office 2007 registry entry to set default fonts ###
IF ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\MailSettings","OutlookDefaultFonts") <> "Arial"
	$rc = WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\MailSettings","OutlookDefaultFonts", "Arial", "REG_SZ")
	$rc = WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\MailSettings","OutlookDefaultFontsDate", "@DATE", "REG_SZ")
	$rc = WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\MailSettings","OutlookDefaultFontsTime", "@TIME", "REG_SZ")
	RUN "regedit.exe /s \\<servername>\Office2007ProPlus\scripts\OutlookDefaultFonts.reg"
   ELSE
	?"Value is already there (Outlook Default Font). No need to change."
ENDIF

Appreciate I could remove the entry for planting the insertion date/time!

The script can sit waiting to complete for long periods of time on occasions, moreso when people are logging into a Terminal Server or when many people are logging in for the first time in the morning (all at the same time).

Does anyone have some ideas how we could speed the process up.

Thanks

Mark


Edited by Mart (2012-01-25 03:43 PM)
Edit Reason: Please use code tags when posting code.