Solved

Switch mouse buttons via command line

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now