Steven Westwell’s blog

My outlook on a few things of interest to me, and hopefully you.

Archive for February, 2008

SharePoint site Backup / Migration

Posted by Steven Westwell on February 29, 2008

[I wrote this entry a little while ago, and is aimed at WSS v2] 

Another frequently asked question, this time around the backup and restoration of a sharepoint site.

Generally the STSADM approach is the best way to do this, as all aspects of the site (including permissions) are backed up.

However there is an alternative using SMIGRATE, which only backs up the site data, and upon restoration all permissions will be reset to default.

To backup a site with smigrate:

Smigrate -w http://portal/sites/oldsite -f c:sharepointbackupsitebackup.fwp

To restore a site with smigrate:

create a new site but do not apply a template i.e. when asked for Team Site, Document Workspace etc… close Internet Explorer

Then run

Smigrate -r -w http://testportal/sites/newsite -f c:sharepointbackupsitebackup.fwp


I was also going to write a “how to” for STSADM but this link says it all really 🙂

Note: SMIGRATE can be found in “Program FilesCommon FilesMicrosoft SharedWeb Server Extensions60Bin ” on the sharepoint server or download from here:

N.B. I must stress that STSADM should be used instead of SMIGRATE if possible in 99.9% of backup senarios.


Posted in Collaboration | Tagged: , , , , , | Leave a Comment »

Migrating a SharePoint List

Posted by Steven Westwell on February 29, 2008

I have been asked about this a few times, and recently I was very specifically asked about how to move a Survey on Windows SharePoint Services Version 2.0, however the following will work for any list in WSS v2 and the approach should also be valid with WSS v3, the exact navigation between settings pages however may vary:

If you navigate to the survey you want to move, and select the “modify settings and questions” in the left panel.

One of the options you will be presented with is “save this list as a template” (you will have the option to save the data as well as the actual set of questions)

Once this is completed you will have the option to create a copy of this survey at any time on your site… however, this template should now be available to download from the administration section of your site:

Site Settings –> Go to Site Administration –> Manage List Template Gallery

you should then be able to right click on the templates name and save the stp file locally.

on the site you wish to migrate the survery to, navigate to the same page:

Site Settings –> Go to Site Administration –> Manage List Template Gallery

and upload the template (.stp file)

This template will now be available when you click “create” on your site

Posted in Collaboration | Tagged: , , , | Leave a Comment »

OCS Localisation (ii)

Posted by Steven Westwell on February 26, 2008

So in my previous post, and over at Modality Systems we began looking at the localisation of Office Communicator 2007 to match the Office 2007 installation.  Over the last week I have updated the script to match the language of the OS.

However, this script is reliant on a task during the build of the client placing a variable into the registry.

Since we are using BDD (forerunner to MDT) and SMS OSD to deploy our client, we have several custom tasks and environment variables available to us during the build.  One of these is the “UILanguage” environment variable which contains the language pack to be installed during the build.  In the scenario we have this variable is populated by the BDD database depending on the role assigned to the particular client being built.

The following line of code writes the registry key that we query, this is run in the context of ztiutility.vbs, as a custom task created in BDD.: 

oShell.RegWrite "HKEY_LOCAL_MACHINESOFTWAREClientIdentificationVistaLanguage", oEnvironment.Item("UILanguage"), "Reg_SZ"

During the install applications phase of the build, following the install of both Office Communicator 2007 and the Office Communicator MUI pack, we execute the below code to localise Office Communicator

Dim iRetVal

On Error Resume Next
iRetVal = OCSLoc
On Error Goto 0

Function OCSLoc()Dim iRetVal
Dim UICode
Dim UILang
Dim strComputer
Dim oReg
Dim arrValueNames
Dim arrValueTypes
Dim strKeyPath
Dim i
Dim oShell
Dim FsoObj1

Const HKEY_LOCAL_MACHINE = &H80000001
Const REG_SZ = 1
Const REG_BINARY = 3
Const REG_DWORD = 4
Const REG_MULTI_SZ = 7
Const Success = 0
Const Failure = 1

Set FsoObj1 = CreateObject("scripting.filesystemobject")
set File_out=FsoObj1.CreateTextFile("c:logginglocationOCSLocalisation.log")

set oShell = CreateObject("wscript.Shell")

'//set default/flag values
iRetVal = Failure
OfficeCode = 1033

'// Check for the UI language and apply to OCS

File_out.writeline("zAZCFG-OCSLanguage: Looking for UI language ID in registry")

'//This script is executed following deployment from BDD/MDT via SMS OSD
'//During the deployment we tattoo the registry with the "UILanguage" environment variable
'//This is in the format en-US, fr-FR etc...

UILang = oShell.RegRead("HKEY_LOCAL_MACHINESOFTWAREClientIdentificationVistaLanguage")
'//Capture error
If Err.Number <> 0 Then
File_out.writeline("zAZCFG-OCSLanguage: Office Language Key not found, defaulting to: en-US")
oShell.RegWrite "HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommunicator MUIDefault Language", 1033, "REG_DWORD"
iRetVal = Success

Set FsoObj1 = Nothing

Exit Function

End if

File_out.writeline("UI Language Identified as: " & UILang)

'// Convert Language to LCID i.e. en-US -> 1033 for all supported languages

Select Case UILang
Case "en-US"
UICode = 1033
Case "nl-NL"
UICode = 1043
Case "fr-FR"
UICode = 1036
Case "de-de"
UICode = 1031
Case "it-IT"
UICode = 1040
Case "ja-JP"
UICode = 1041
Case "es-ES"
UICode = 3082
Case "ar-SA"
UICode = 1025
Case "zh-CN"
UICode = 2052
Case "zh-HK"
UICode = 3076
Case "zh-TW"
UICode = 1028
Case "cs-CZ"
UICode = 1029
Case "da-DK"
UICode = 1030
Case "fi-FI"
UICode = 1035
Case "el-GR"
UICode = 1032
Case "he-IL"
UICode = 1037
Case "hu-HU"
UICode = 1038
Case "ko-KR"
UICode = 1042
Case "nb-NO"
UICode = 1044
Case "pl-PL"
UICode = 1045
Case "pt-BR"
UICode = 1046
Case "pt-PT"
UICode = 2070
Case "ru-RU"
UICode = 1049
Case "sv-SE"
UICode = 1053
Case "tr-TR"
UICode = 1055
Case "bg-BG"
UICode = 1026
Case "hr-HR"
UICode = 1050
Case "et-EE"
UICode = 1061
Case "lv-LV"
UICode = 1062
Case "lt-LT"
UICode = 1063
Case "ro-RO"
UICode = 1048
Case "sr-Latn-CS"
UICode = 2074
Case "sk-SK"
UICode = 1051
Case "si-SI"
UICode = 1060
Case "th-TH"
UICode = 1054
Case "uk-UA"
UICode = 1058
Case Else
UICode = 1033
End Select

File_out.writeline("UICode set to: " & UICode)

If UICode > 999 and UICode < 10000 Then

File_out.writeline("zAZCFG-OCSLanguage: Writing language code to OCS key: " & UICode)
oShell.RegWrite "HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommunicator MUIDefault Language", UICode, "REG_DWORD"
iRetVal = Success


File_out.writeline("zAZCFG-OCSLanguage: Language Key not valid, defaulting to: en-US")
oShell.RegWrite "HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommunicator MUIDefault Language", 1033, "REG_DWORD"
iRetVal = Success

End If

Set FsoObj1 = Nothing

OCSLoc = iRetVal

End Function

Posted in Collaboration, vista | Tagged: , , , , , , , , , , | Leave a Comment »

OCS Localisation

Posted by Steven Westwell on February 21, 2008

As mentioned by John Lamb in his blog over at Modality Systems, we have been looking into automating the localisation of Office Communicator client.

After a bit of thought it seems most obvious to match the language of Office Communicator to the operating system language rather than Office, however before this happened I put together the following code to match the office communicator client to office 2007:

  If Err.Number <> 0 Then
   ologging.CreateEntry "zAZCFG-OCSLanguage: Office Language Key not found, defaulting to: en-US", LogTypeInfo 
   oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Communicator MUI\Default Language", 1033, "REG_DWORD"
   iRetVal = Success
   If OfficeCode = 1033 Or OfficeCode = 2052 Or OfficeCode =  1043 _
    Or OfficeCode = 1036 Or OfficeCode = 1031 Or OfficeCode = 1041 _
    Or OfficeCode = 1042 Or OfficeCode = 1046 Or OfficeCode = 3082 _
    Or OfficeCode = 1028 Or OfficeCode = 1030 Or OfficeCode = 1035 _
    Or OfficeCode = 1040 Or OfficeCode = 1053    

    ologging.CreateEntry "zAZCFG-OCSLanguage: Writing language code to OCS key: " & OfficeCode, LogTypeInfo 
    oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Communicator MUI\Default Language", OfficeCode, "REG_DWORD"
    iRetVal = Success
    ologging.CreateEntry "zAZCFG-OCSLanguage: Office Language Key not supported in OCS MUI, defaulting to: en-US", LogTypeInfo 
    oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Communicator MUI\Default Language", 1033, "REG_DWORD"
    iRetVal = Success
   End If 
  End If 

oshell is a windows shell object and ologging is a ZTIUtility file writing parameter.

In the near future I will update with a script to set office communicator to match Vista 🙂


Posted in Collaboration | Tagged: , , , , , , , | 2 Comments »

Another Japanese Keyboard update – Fix

Posted by Steven Westwell on February 20, 2008

Following up directly on the previous post, the following vbscript should add the required registry values for the japanese keyboard driver to be used by the Japanese IME:

Option Explicit
Dim ReturnValue
ReturnValue = FixJPKB()

Function FixJPKB()
DIM iRetValue
Dim WshShell

set WshShell = CreateObject("wscript.Shell")

WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters\LayerDriver JPN", "kbd106.dll", "REG_SZ"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters\OverrideKeyboardIdentifier", "PCAT_106KEY", "REG_SZ"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters\OverrideKeyboardSubtype", 2, "REG_DWORD"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters\OverrideKeyboardType", 7, "REG_DWORD"

Set WshShell = nothing

End Function


Since this looks like it may also affect non Japanese IME’s I will update following some tests in case handling of the Korean keyboards is required or if this affects alternate IME’s

Posted in Japan, vista | Tagged: , , , , , , , , , , | Leave a Comment »

USB Japanese Keyboard Driver issue (with Vista)

Posted by Steven Westwell on February 19, 2008

Following up on my previous post about selecting the correct driver for the Japanese IME, the following microsoft kb article shows how this issue can come about with USB keyboards, and how to edit registry values to select the right driver:

Posted in Japan, vista | Tagged: , , , , , , , | Leave a Comment »

Office 2007 + OSD + DFS issue

Posted by Steven Westwell on February 11, 2008


Whilst deploying office 2007 via SMS OSD, with an updates location specified in the config.xml set as a DFS path (Windows 2003 SP2), Office 2007 fails to install intermittantly. In the below situation Office 2007 has been cached in the LIS (Local Installation Source) of our Windows Vista Image / .wim. 

When deploying the image to a new machine we run c:\msocache\all users\{[insert guid later]}\setup.exe /config config.xml to install Office 2007 from the locally cached source.  This config.xml stipulates the language to install office in and the update locations to check for additional MSP files to be applied during the install.

Expected Behaviour 

Office 2007 parses remote supdatelocations listed in the config.xml then the locally cached msp files.


The Office installer picks up all supdatelocations listed in the config.xml

Config.XML Extract:

<SetupUpdates CheckForSUpdates="Yes" SUpdateLocation\\DFSStore\ParentFolder\OfficeUpdates\ />
<AddLanguage Id="de-DE" ShellTransform="Yes" />
<Logging Type="Verbose" Path="c:\minint\" Template="MSOVerboseLog-(*).txt" /> 

The Beginning of the log file showing supdatelocations parsed:

PERF: TickCount=471325 Name=OBootStrapper::Run Description=Begin function
Operating System version: 6.0.6000 . Platform ID: 2
Running on a 32-bit operating system.
Command line: setup.exe /config "c:\msocache\config.xml"
Parsing command line.
Handling command line option: /config
Config XML file specified: c:\msocache\config.xml
Parsing config.xml at: c:\msocache\config.xml
Preferred product specified in config.xml to be: PROPLUS
Parsed AddLangauge: CultureTag with value: de-de in config.xml.
Parsed AddLanguage\ShellTransform: true.
Logging type verbose specified in config.xml.
Log directory: c:\minint\ specified in config.xml
Log file template: MSOVerboseLog-(*).txt specified in config.xml
Display level basic specified in config.xml.
Show modal dialogs specified in config.xml.
Hide completion notice specified in config.xml.
Auto accept license specified in config.xml.
PIDKEY element successfully parsed in config.xml
COMPANYNAME specified in config.xml.
SUpdateLocation path specified in config.xml: \\DFSStore\ParentFolder\OfficeUpdates\
Log level changed from: Standard to: Verbose
Searching for best setup controller dll to load...
Checking for setup controller dll at [\\DFSStore\ParentFolder\OfficeUpdates\].
Checking for setup controller dll at [c:\MSOCache\All Users\{90120000-0011-0000-0000-0000000FF1CE}-C\Updates].
Checking for setup controller dll at [c:\MSOCache\All Users\{90120000-0011-0000-0000-0000000FF1CE}-C].
  Found setup controller dll at [c:\MSOCache\All Users\{90120000-0011-0000-0000-0000000FF1CE}-C\OSETUP.DLL].
  Version [12.0.4518.1014].
Verify file signature in "c:\MSOCache\All Users\{90120000-0011-0000-0000-0000000FF1CE}-C\setup.exe"
"c:\MSOCache\All Users\{90120000-0011-0000-0000-0000000FF1CE}-C\setup.exe" is verified to be a valid file
Verify file signature in "c:\MSOCache\All Users\{90120000-0011-0000-0000-0000000FF1CE}-C\OSETUP.DLL"
"c:\MSOCache\All Users\{90120000-0011-0000-0000-0000000FF1CE}-C\OSETUP.DLL" is verified to be a valid file
Using setup controller dll at [c:\MSOCache\All Users\{90120000-0011-0000-0000-0000000FF1CE}-C\OSETUP.DLL].
PERF: TickCount=489655 Name=OBootStrapper::Run Description=Calling RunSetup
Opening log file c:\minint\MSOVerboseLog-(20080128154209130).txt.

However, Later, roughly 3470 lines further into the log, we see two different types of behaviour

a) Office installation suceeds

From the following log file it looks like the DFS share has not been searched, but the local MSP files have been applied.

Searching for patches in: c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000000.msp
Patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000000.msp is applicable for the current chained install.
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000001.msp
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000002.msp
Patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000002.msp is applicable for the current chained install.
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000003.msp
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000004.msp
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000005.msp
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000006.msp
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000007.msp
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000008.msp
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000009.msp
Patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch00000009.msp is applicable for the current chained install.
Discovered patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch0000000a.msp
Patch c:\MSOCache\All Users\PROPLUSOFFICE12PATCH-C\Patch0000000a.msp is applicable for the current chained install.

b) Office installation fails

We see that Office has attempted to read from the DFS share but errors.

Searching for patches in: \\DFSStore\ParentFolder\OfficeUpdates\
Error: file search failed ErrorCode: 5(0x5).
Error: file search failed ErrorCode: 5(0x5).
Catalyst execution finished: 01/28/2008 15:42:13.  Return code: 30015.  Exception caught: ErrorCodeOnly.
PERF: TickCount=494507 Name=RunSetup Description=End function
Setup temp foler set to [C:\Windows\TEMP\Setup00000130].


In a word, permissions, the account SMS is attempting to install Office 2007 with does not have read access to the DFS share where the MSP files are stored.  By giving the “Domain Computers” group read permissions on the share Office installs without incident every time.

Other network share types tested show that a lack of permissions on a standard share logged as per the failed logs, except that the install continues on to search additional supdatelocation’s without failing.

This may only be an issue with DFS on Windows 2003 SP2, and possibly be due to other environmental circumstances i.e. poor network connectivity and time outs.

If anyone else experiences similar issues with the Office 2007 installer accessing DFS shares I would be interested to hear about it.


Posted in vista | Tagged: , , , , , , , | Leave a Comment »


Posted by Steven Westwell on February 6, 2008


 Last night we went to see Kodo, a group of Japanese Drummers, and they were great!

I got home from work and was shattered, not really feeling in the mood to be going to a concert, but tickets had been bought and I was interested to see Kodo live.

Considering we only picked up tickets last minute, our seats were central and we had a really good view of the stage.  The show was split into two halves entitled “Spirit” and “Dance”.


the first half of the show appeared to focus more on the music, drumming and occasional singing.  all of which was very very good.  There were several very epic displays of what could be achieved with some very clever techniques, which both sounded and looked very awsome.


The second half of the show had a bit more ceremony about it and contained a bit more showmanship.  This half of the show also included a huge drum and a serious amount of stamina and strength which was very very impressive.

 The show ended with all 15 members of Kodo present that evening playing and several rounds of applause.


Awsome show!

Kodo Blog:

It’s definately worth catching Kodo live if they are playing in your area, and if they are not pick up their cd! 🙂


Posted in Japan | Tagged: , , , | Leave a Comment »

Japanese Keyboard on Vista

Posted by Steven Westwell on February 6, 2008


so as part of our global deployment of Windows Vista, we found that the Japanese users of the Japanese IME had an issue with the keyboard layout being incorrect.  The hirigana, Katakana and romanji where correct for the most part, however the symbols “, @, (, ) and * etc were in the US locations, not as they should be on a Japanese keyboard.

Others in the UK will be familier with typing <shift> + 2 expecting ” and getting @, well this is the same thing fundamentally, just complicated with the IME layout not being something that can be switched by the users locale.


After digging around I managed to find a few excellent posts on this problem and showing the solution for Windows NT, 2000, XP etc… It would appear to be one of those consistent issues that has been with the OS for a long time.

It was enough to point me in the right direction and I thought it was only fair to post the Vista specific solution here.

The problem is the IME seems to get its keyboard layout directly from the keyboard driver, rather than the keyboard locale settings that typically control layouts.  In order to fix this the Japanese keyboard driver must be selected manually.

below are the step by step instructions for an english OS, I may attempt to translate into Japanese soon, or at least include screenshots from a Japanese client to show the dialogue boxes:

  1. Open the Device Manager
    1. Open the start menu
    2. Right click on computer
    3. Select manage (Entering PA account details when prompted)
    4. Select device manager
  2. Change the Keyboard Driver
    1. Open the keyboard tree
    2. Right click the keyboard
    3. Select “update driver software…”
    4. Select “browse my computer for driver software”
    5. Then select “let me pick from a list of device drivers on my computer”
    6. Uncheck the “show compatible hardware” checkbox
    7. Then choose the (Standard Keyboards) as Manufacturer and Japanese PS/2 Keyboard (106/109 Key) as Model
    8. Then select next
    9. The driver will then be installed, then click close

After the next reboot the default layour will be the Japanese layout, and the ” symbol will be in the correct place when using the Japanese IME.

Thanks to:

Cameron Beccario: /


Michael Eng:

Cameron’s blog was an interesting read, and also lead me to find a very cool and interesting to read about Japanese language school:



Posted in Japan, vista | Tagged: , , , , , , , , , , | Leave a Comment »