?
Solved

Switch mouse buttons via command line

Posted on 2008-10-29
3
Medium Priority
?
4,601 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 25

Accepted Solution

by:
slam69 earned 1000 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 1000 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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

Configuring Remote Assistance for use with SCCM
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Suggested Courses

770 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