Solved

Switch mouse buttons via command line

Posted on 2008-10-29
3
4,541 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 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Determining the an SCCM package name from the Package ID
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
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…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

691 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