Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Wednesday, 18 May 2011

Unable to Spell Check Signatures In Outlook

A couple of our clients have asked how to get Outlook to spell check their signatures when sending emails recently.  At first I thought this was entirely unnecessary as you should just check the spelling when you create the signature and it shouldn't change after that.  But one of these clients has quite a fancy signature consisting of a sidebar and the email message gets typed along side that - as this then falls within the signature block it does not get spell checked.

We did quite a bit of research on this and everything we found said that it is not possible to enable spell checking in signatures in any version of Outlook.

However, I found a workaround.  It's really quite simple and I wouldn't normally post something like this here, but as everyone else is saying it is impossible I thought I really should point out how to do it.

Use stationery instead.

That's it, just move the signature html file from the signature folder under the user profile and place it in the stationery folder.  Then disable the signature and go into Stationery and set this as your theme instead.

And there you go, the "signature" is now spell checked correctly.

Monday, 25 October 2010

Backup Exec 2010 SBS/Sharepoint Database Errors

Been noticing a few problems recently with Backup Exec 2010 complaining about the default SBS 2008 databases.

Specifically the logs say that the transaction logs for these databases are not being backed up and the recovery mode should be set to simple.  However, it is not straight forward to do this, particularly as the SQL Management Studio is not part of SBS

These are the errors as shown in the Backup Exec logs:

Backup- XXXXXXXX\MICROSOFT##SSEEV-79-40960-37914 - Database WSS_Content is configured to maintain transaction logs. Transaction log backups are not being performed. This will result in the log growing to fill all available disk space. Regular log backups should be scheduled or the database should be changed to the simple recovery mode.

Backup- WebApplication\Content-DB 1 (XXXXXXXX\MICROSOFT##SSEE\SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab)V-79-40960-37914 - Database SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab is configured to maintain transaction logs. Transaction log backups are not being performed. This will result in the log growing to fill all available disk space. Regular log backups should be scheduled or the database should be changed to the simple recovery mode.

Backup- SBS SharePoint\Content-DB 1 (XXXXXXXX\MICROSOFT##SSEE\ShareWebDb)V-79-40960-37914 - Database ShareWebDb is configured to maintain transaction logs. Transaction log backups are not being performed. This will result in the log growing to fill all available disk space. Regular log backups should be scheduled or the database should be changed to the simple recovery mode.

Backup- ConfigurationV3-DB (XXXXXXXX\MICROSOFT##SSEE\SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6)V-79-40960-37914 - Database SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6 is configured to maintain transaction logs. Transaction log backups are not being performed. This will result in the log growing to fill all available disk space. Regular log backups should be scheduled or the database should be changed to the simple recovery mode.

I've put the database names in bold above to make it easier to pick them out, the long alphanumeric strings in two of them will be different on each server so be sure to substitute the correct ones when running the commands below.

To set the recovery mode to simple for these databases, use osql from the command prompt as follows:

C:> osql -E -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
1> ALTER DATABASE WSS_Content SET RECOVERY SIMPLE
2> go
1> ALTER DATABASE ShareWebDb SET RECOVERY SIMPLE
2> go
1> ALTER DATABASE [SharePoint_AdminContent_d4e397f2-a27a-48a0-a628-d25db6672bab] SET RECOVERY SIMPLE
2> go
1> ALTER DATABASE [SharePoint_Config_29c26fca-17b8-48c1-9704-b869932abcb6] SET RECOVERY SIMPLE
2> go

NOTE: That the last two with the long alphanumeric strings need to be surrounded by square brackets [], or you will get a syntax error complaining about the '-' symbol.  I originally thought I would be clever and just quote these database names, but then I got an error saying that 'recovery' is not a recognized option.  Square brackets fixes this.



Friday, 29 January 2010

Managing Roaming Profile Size

Many of my clients have problems with their roaming profiles getting too large.
As mentioned in a previous post, this is mainly due to badly written software storing files in the roaming, rather than local, part of the user profile.  In addition to slowing down logins, there is a hardcoded limit of 90MB on roaming profiles so it is important to keep this nice and trim.
To combat this, I have written a script which can be run periodically (weekly say, overnight when the users are logged out) to clear out all the cruft that, left alone, will cause the profile to break.
Currently this script removes the following files:
  • Adobe update files
  • Real update files
  • Java cache files
  • Apple iPod & iPhone firmware updates
Hopefully this may prove useful to others, just make sure to set the PROFILE_ROOT variable to point to the location of the roaming profiles on the server.
If you want to see what it will do before, then run with the -test switch which will just output what it intends to remove, but wont actually delete anything
@echo off
REM cleanup_profiles.cmd
REM v 1.0
REM This file removes any unnecessary files from roaming profiles
REM files removed:
REM     Adobe update files
REM     Real update files
REM     java cache files
REM     ipod & iphone firmware updates
REM by Jon Reeves
REM run with -test switch to just show what would be done, but not
REM actually delete any files
REM cleanup_profiles -test
REM ***** MAKE SURE to set the PROFILE_ROOT variable *****
SET PROFILE_ROOT=E:\Shared\Profiles
REM ******************************************************
set TESTRUN=FALSE
if "%1" == "-test" set TESTRUN=TRUE
SET DELETION_FILE=%TEMP%\profcleanupdeletion.txt
REM list folders to be deleted
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO dir /s /b /a:d "%PROFILE_ROOT%\%%u\Application Data\Adobe" | findstr Updater >> %DELETION_FILE%
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO dir /s /b /a:d "%PROFILE_ROOT%\%%u\Application Data\Real" | findstr Update >> %DELETION_FILE%
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO echo "%PROFILE_ROOT%\%%u\Application Data\Sun\Java\Deployment\cache" >> %DELETION_FILE%
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO dir /b /s "%PROFILE_ROOT%\%%u\Application Data\Apple Computer\iTunes\iPhone Software Updates" | findstr .ipsw >> %DELETION_FILE%
for /F "delims=" %%u in ('dir %PROFILE_ROOT% /B /A:D') DO dir /b /s "%PROFILE_ROOT%\%%u\Application Data\Apple Computer\iTunes\iPod Software Updates" | findstr .ipsw >> %DELETION_FILE%
REM do the actual deletion
if %TESTRUN% EQU TRUE goto TESTRUN
REM delete directories
for /F "delims=" %%d in (%DELETION_FILE%) DO rmdir /S /Q %%d
REM delete files
for /F "delims=" %%f in (%DELETION_FILE%) DO del /F /Q %%f
goto CLEANUP
:TESTRUN
echo Test run completed, no files have been deleted
notepad %DELETION_FILE%
:CLEANUP
REM clean up temp files
del %DELETION_FILE%
set TESTRUN=

Thursday, 3 September 2009

Java Cache Profile Size Problems

EDIT:  see my later post on this subject for more tips on managing roaming profile sizes

Been having this for a while, off and on with various clients, particularly on Citrix/Terminal servers, user calls up unable to log off because their profile exceeds the size limit.

9 times out of 10, this is due to the Java cache with the other 10% being Adobe update files. These programs incorrectly store temporary data in the roaming part of the user profile rather than the local part where it should be. The Adobe issue is rarer and easily dealt with by deleting the update file, but the Java cache keeps coming back.

The solution is to move the Java temporary files cache which can be easily done from the Java Control Panel applet. Unfortunately on a typical locked down terminal server, users do not have access to the Control Panel to change this and it is a per user setting, so changing it as the administrator doesn't help.

After much intensive Googling I finally found how to change this in the background, without having to give the user admin rights and log on as them (which is even more of a pain the more users you have). All that needs to be done is to add a line to the Java deployment.properties file to set the deployment.user.cache property.

This file is located in the user profile, so normally,
C:\Documents and Settings\_username_\Application Data\Sun\Java\Deployment\deployment.properties

By default (with the deployment.user.cache property not present), Java cache files are stored in
C:\Documents and Settings\_username_\Application Data\Sun\Java\Deployment\cache

And this is the problem, that should be \Local Settings\Application Data..... in order for those temp files to be kept locally to the machine and not copied around as part of the roaming profile.



Now setting this to a different location is easy, just add to the deployment.properties file, say

deployment.user.cache=C\:\\Temp

*note the escaped characters !

However, the user in question needs write access to this location (which they shouldn't have if the server is even marginally locked down), so the best bet is to just dump it into the Local Settings part of the profile. Trouble is, the deployment.properties file does not support system environment variables so you need to hard code the full path, which is a problem if you are trying to script this setting for all users.

Luckily the file does recognise some Java environment variables one of which can be inelegantly kludged to point into the correct location:

deployment.user.cache=$USER_HOME\\..\\..\\..\\Local Settings\\Application Data\\Sun\\Java\\Deployment\\cache

* NOTE - this is all one line.


This can easily be added to logon scripts, e.g.

echo
deployment.user.cache=$USER_HOME\\..\\..\\..\\Local Settings\\Application Data\\Sun\\Java\\Deployment\\cache >> %APPDATA%\Sun\Java\Deployment\deployment.properties

* NOTE - this is all one line too.


The Java client seems to read and rewrite this file on a pretty frequent basis so it will clean up any additional lines that are put in.

An even better method is to use a machine wide deployment.properties file.


You will need to create the following two files:

C:\Windows\Sun\Java\Deployment\Deployment.config

deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties

* NOTE - this is all one line

C:\Windows\Sun\Java\Deployment\Deployment.properties

deployment.user.cachedir=$USER_HOME\\..\\..\\..\\..\\Local Settings\\Application Data\\Sun\\Java\\Deployment\\cache

deployment.user.cachedir.locked=

* NOTE - this is two lines.

The last line locks the setting so that users cannot change it, so you may or may not want this.


Lastly, if you are running on a Windows 2008 Server you don't need to worry about any of this.  On 2008 the default location is in the LocalLow part of the profile which doesn't roam - at last!

Friday, 8 February 2008

Un-Scheduled Tasks

Just had a weird problem with one of my servers running scheduled tasks twice.

Sometimes, the backup job would run twice, and sometimes the job that emails me the backup report would run twice. When ever a job was duplicated, the logs showed that it ran several minutes early.

Most of the time though, they both only run once, as they should.

I had no idea what might be causing this.

I checked the scheduled task logs, even ran the AT command in case something had been put in there, but nothing.

It was only once I got round to looking in the obvious place of the event logs that I saw loads of w32time errors....

What was happening was that the server was failing to synchronise with the domain controller for long periods and the clock would drift until it managed to reconnect. If this happened while the backup ran then the clock would get shifted backwards and the scheduled task would run again.

Why the server is having trouble connecting to the NTP server, and why the clock is drifting so much and why it seems to resynchronise during the backups, are entirely different questions of course.

I suspect it is because this server is a virtual machine running on a heavily loaded physical server, but further work is happening to rectify this so we'll see then if the time problem goes away too.