Solved

Switch mouse buttons via command line

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

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Update Isn't working 41 137
Remove row and column 3 50
Auto-indent certain lines in Notepad++ 10 31
WIndows 10 tablet mode on screen keyboard split mode 7 28
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
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 …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
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…

895 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

15 Experts available now in Live!

Get 1:1 Help Now