Solved

Switch mouse buttons via command line

Posted on 2008-10-29
3
4,500 Views
Last Modified: 2012-05-05
I would like to switch mouse buttons (swap left and right click) via a batch file in Windows XP.  When I log in via Remote Desktop, I run a batch file with my settings, but I cannot seem to find the API to change this particular setting.
0
Comment
Question by:slow1000
3 Comments
 
LVL 25

Accepted Solution

by:
slam69 earned 250 total points
ID: 22839402
you need the file to do teh following

1. Open regedit
2. Goto User Key: HKEY_CURRENT_USER\Control Panel\Mouse
3. Create a new REG_SZ (String Value)
4. Name it SwapMouseButtons
5. Set the value to 1 for swap
0
 
LVL 2

Assisted Solution

by:Eonasdan
Eonasdan earned 250 total points
ID: 22846988
to change this in windows, just go to control panel > Mouse > buttons > swap primary and secondary buttons. If you want to do this by a batch file. Then export the registry key HKEY_CURRENT_USER\Control Panel\Mouse\SwapMounseButtons (with a value of 1)  save it somewhere your bath file can get to and add this line to your batch file

"regedit.exe /s registry.reg"

change registry.reg to whatever you called it when you exported the key
0
 
LVL 8

Author Closing Comment

by:slow1000
ID: 31511550
Thanks to both of you.  Slam69 gave me the info I needed to solve this myself, but Eonasdan--thanks for the complete solution.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question