I'm trying to create a login script to use with Workgroup Manager that will allow me to change the keyboard modifer keys on a client machine at login. I've done a search and found a few scripts but they don't seem to work. For example the following script:

tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.keyboard"
tell application "System Events"
tell process "System Preferences"
click button "Modifier Keys…" of tab group 1 of window "Keyboard & Mouse"
set curOpt to (get value of pop up button 3 of sheet 1 of window "Keyboard & Mouse")

set curCmd to (get value of pop up button 4 of sheet 1 of window "Keyboard & Mouse")

tell sheet 1 of window "Keyboard & Mouse"
tell pop up button 3
click
click menu item curCmd
end tell
tell pop up button 4
click
click menu item curOpt
end tell
end tell
click button "Ok" of sheet 1 of window "Keyboard & Mouse"
end tell
end tell
quit
end tell

I am trying to get this to work on OS X 10.6 with no luck. Firstly I have seperate options in System Preferences for Keyboard and Mouse settings (the script above points to window "Keyboard & Mouse") and secondly, even after changing the "Keyboard & Mouse" to just "Keyboard" I get an error message about not being about to locate button "Modifier Keys...".

All I'm trying to do is change the Modifier Keys so that Crtl key is set to nothing on login. Could anyone help me out with this?