Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible to control Left-handed Mouse settings via GPO? (or a script that can be pushed using GPO :)

I have Windows 7 / Windows Server 2008.

Many thanks for your advice.


share|improve this question
@Toastman: Blind AND left-handed eh? :) – techie007 Feb 3 '10 at 18:18
Haha!! Indeed :-) – ToastMan Feb 3 '10 at 19:16

3 Answers 3

up vote 4 down vote accepted

I realize you already accepted an answer, but here's a VBS version of it for you as well (cause I know you were kind of looking for that):

Const HKEY_CURRENT_USER = &H80000001 
strComputer = "."  
Set Shell = CreateObject("WScript.Shell")  

Set objRegistry = GetObject ("winmgmts:\\" & strComputer & "\root\default:StdRegProv")  
strKeyPath = "Control Panel\Mouse"  

strValueName = "SwapMouseButtons"
strValue = "1"
objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue

Just be aware that these settings won't take affect until the next time the user logs in (after it's been applied), and also be aware that things like Logitech's MouseWare and SetPoint will often just switch that registry setting back (until you set it in their mouse-specific software) once they load after logon.

share|improve this answer
Ah ha! Now that's exactly what I needed :) Thanks again techie007, that's the second mouse problem u help me with :P – ToastMan Feb 3 '10 at 19:06

Yes, it can be done.

Group Policies -> User Configuration -> Preferences -> Windows Setting

Go to the 'Registry' setting.

Add a new Registry setting.

[HKEY_CURRENT_USER\Control Panel\Mouse]
SwapMouseButtons (RegSZ) = 1
share|improve this answer
Thank you this is good as well. – ToastMan Feb 3 '10 at 18:42

This is the answer as it swap to left handed then click again and it swaps back. The SwapMouseButtons only goes to left handed but not back.

Change between left and right handed and back with one script - click once it changes then click again and it changes it back vs. the RUNDLL32.EXE USER32.DLL,SwapMouseButton which only swaps to left hand but not back .

Note: if you want to email this file after you create this into MouseHandSwitch.vbs copy the following script and save it as a .vbs file on desktop and now you get it.

'> Mouse change Left to Right handed.
'>           and repeat to set Left to Right handed again.
'>    By William Anderson  July 17, 2015

Sub DoAction(str, ms)
    '> Check status until ready
    status = (WshShell.AppActivate)(cPanel.ProcessID)

    Do Until status = true
        WScript.Sleep 100
        status = (WshShell.AppActivate)(cPanel.ProcessID)
        WScript.Sleep 100

    if status = true then
        WshShell.SendKeys str
        WScript.Sleep ms
    End if
End Sub

'> Set windows for best performance
Set WshShell = CreateObject("WScript.Shell")
Set cPanel = WshShell.Exec("rundll32.exe shell32.dll,Control_RunDLL main.cpl")
status = (WshShell.AppActivate)(cPanel.ProcessID)

Do Until status = true
    WScript.Sleep 100
    status = (WshShell.AppActivate)(cPanel.ProcessID)
    WScript.Sleep 100

if status = true then
'> Send alt S to mouse panel
    DoAction "%S", 20 
    DoAction "{ENTER}", 20
End if 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.