Once I installed Windows 8 on my MacBook Air (there was no Surface Pro at the time), I thought I had everything I wanted in a computer. But once I’d spent some time writing on it, I found the trackpad might be a tad over-sensitive for my needs. I had tried Trackpad++ in the past, but the prerequisite software was off-putting, and I’d still find myself typing into the middle of another paragraph. Why couldn’t I just turned the darned thing off?

Well, it turns out that I could and, after a few hours of fiddling around, I’m here to tell you how. I think this method should work for any post-XP Windows laptop (and probably even on XP), but I’ve only tried it on my Late 2010 , 13.3” MacBook Air 3.2, running Windows 8 x64, and my wife’s Mid 2011, 11” Air 4.1 running Windows 7 x64 (both in Boot Camp). So, if you’ve got a little Windows experience and aren’t scared of trying out some simple scripts, let’s get started.

NOTE: If you have some command line experience, this will be really straight forward, and (after reading the disclaimers below, of course) you can jump to Section One – Less Than 10 Steps to Touchpad Freedom. If you don’t have a lot of experience, but want to try this out anyway (because it is soooo nice to be able to turn the touchpad off), check out Section Two – The Nitty-Gritty, Step-by-Step Details which details all of the steps. Some users may know most of the big steps in Section One, but need help on other steps. For this reason I’ve linked each short step to a more detailed version that you can access by clicking on the ‘Step X’ link. When you’re done with the detailed step, you can click on the ‘Back to Short Version’ link to bring you back to the top. Finally, if you reach the end and forget where a link was, or just want some further information, check out the Resources & Links.

Nasty Disclaimer:

While I experienced no negative side effects from this procedure (and don’t expect you will either), I cannot be held responsible for you messing up your computer in any way. Any errors that arise as a result of this procedure (concerning your laptop, or your personal life) are yours and yours alone. That said, I’d be happy to help if I’ve got the time, and encourage you to reach out if you come up against a wall.

Section One – Less Than 10 Steps to Touchpad Freedom

Step 1: Download and install the latest versions of Advanced BAT to EXE Convertor (Alternative CNET Download) and AutoHotKey (Alternative CNET Download)



Step 2: Download and extract the DevCon tools from the Microsoft Technet page How to Obtain the Current Version of Device Console Utility (DevCon.exe) or grab the already isolated DevCon executable (though I don’t promise to keep this up to date) zip file from my DropBox.

md5 for devcon.zip = 9e2856cbb7853b2fb9306fb2924bc249

Extract the executable to a permanent folder location that will be used for this project.



Step 3: In a Command Prompt window with administrative privileges, change directory to the folder now containing your DevCon.exe file. Input the appropriate DevCon ‘find’ command using the ‘=mouse’ argument to indicate that DevCon should find only devices associated with a mouse, and the ‘>’ argument to write out the program’s return to a file (below: mouse_list.txt).

HINT: You could just as easily have DevCon ‘find’ all of your devices by using the ‘*’ argument.

Open the mouse_list.txt file created in step 3 and note the ID strings.





Step 4: Test the individual device ID strings using the DevCon disable and enable functions in command prompt. Once you have isolated the touchpad’s device ID, take note of it. We’ll by using this in our script.

NOTE: You’ll know when you have found the right ID string when you disable a suspect string and the touchpad (mouse) fails to respond to user input. Pressing the ‘up arrow’ and changing the disable to enable (then pressing enter) should restore touchpad function. Using the red ID in the image above did nothing on my computer, while using the blue string in my DevCon ‘disable’ command, disabled the touchpad and made it completely unresponsive. Perfect.





Step 5: Open an instance of Advanced BAT to EXE Converter, and paste in the following script modifying both; the path information to reflect the folder of your DevCon executable, and the device ID in quotes after the ‘@’ symbol to reflect your specific device ID.

NOTE: Your device ID needs to be placed in all three devcon calls (unless you wish to build a variable) in the script.

cd "C:\users\michael\devcon" devcon status @"HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000" > EnOrDis.txt findstr "disabled" EnOrDis.txt IF %ERRORLEVEL% EQU 0 ( devcon enable @"HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000" ) ELSE ( devcon disable @"HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000" )

When finished, you should have something like:

EDIT: I noticed (when trying to do this on my new 2015 12″ Air w/ Windows 8) that Advanced BAT to EXE Convertor throws an error if the text file (here: EnOrDis.txt) doesn’t already exist. If you get an error, try creating a blank text file with a matching file name in the correct location first.

Build and save the executable by clicking on the ‘Build EXE’ button highlighted in red above, making sure to select the ‘Start Invisible’ option on the following screen.



Step 6: Once the EXE file is built, set it to ‘Run as Administrator’ on the ‘Compatibility’ tab of the file’s ‘Properties’ menu.



Step 7: Using Notepad, generate an AutoHotKey script to call your executable on a button press and save it as a ‘.ahk’ file in your DevCon Folder. On my machine I used the keys ‘CTRL+ALT+n’

^!n:: Run "C:\users\michael\devcon\EnaDis.exe"

Step 8: Set the AutoHotKey.exe file (default path: “C:\Program Files\AutoHotkey”) to ‘Run this program as an administrator’ in the ‘Change settings for all users’ section of the ‘Compatibility’ tab on the ‘Properties’ menu.



Step 9: Finally, create a Scheduled Task to call the AutoHotKey ‘.ahk’ script with the following conditions:

General

i. Using the local User Account

ii. Set to ‘Run only when user is logged on’

iii. Set to ‘Run with highest privileges’

Triggers

i. At log on of any user

Actions

i. Start a program

ii. Browse and select the location of your ahk script.

iii. ‘Add arguments’ and ‘Start in’ left blank.

Conditions

i. None: Uncheck all conditions

Settings

i. Default

History

i. Default

Section Two – The Nitty-Gritty, Step-by-Step Details



Step 1.) Gathering and Installing Supplemental Software

When I did this on my own, I had to play around with different versions of software to find out what worked and what didn’t. If I knew then what I know now (that these two programs work well and can be trusted), I would have taken care of this step at the beginning.

A.) Download and install Advanced BAT to EXE Converter. This software will allow us to overcome a limitation of batch files (namely, that you can’t set them to always Run as the Administrator) by transforming the scripts that we write into executable files.

1.) You can download the software from CNET but I wouldn’t. I’ve missed checkmarks in CNET’s installer before and it has installed unwanted stuff onto my computer. Instead I’d go over to the Advanced BAT to EXE Converter webpage and download it straight from the source. In fact here’s a link directly to the download.

2.) Locate the downloaded installer in your Downloads folder and double-click on it to begin the installation.

3.) If you get a UAC (User Account Control) warning, agree to it, and agree to the terms and conditions of the software. Finish clicking ‘Next’ through the installation.

4.) Once the program finishes installing, you’ll be asked if you want to run the software. Go for it, but close it once you’ve seen that it runs.

B.) Download and install AutoHotKey. This software will allow us to link a set of keyboard buttons to the program that we build. Outside of our immediate needs, AutoHotKey is a very simple and powerful software that can map most computer actions to your keyboard keys. While I don’t have time to cover it here, if you like to check out their FAQ and tutorials I think you’d be glad you did.

1.) Again, download the software either from CNET, the AutoHotKey website, or directly.

2.) Find the installer and double-click it to start the installation.

3.) Agree to UAC warning (if applicable) and wait for this screen to pop up, signaling installation.

4.) Once you’re here, click ‘Exit’ and we can proceed to the next step.

Back to the Short Version



Step 2.) Finding and Installing the DevCon Tools

When I first started toying with the idea of disabling my mouse, I went to the Windows Device Manager to see how the computer would react to me repeatedly disabling and enabling the device. This method worked well, but what I didn’t have was ‘command line’ access the sweetness of the Device Manager.

The good news is that Microsoft built a software tool to allow us this access. The bad news is that to get it, you need to download and extract it from the latest version of the Windows Driver Kit. (A 600+MB download for a 600 KB file, come on Microsoft!) Anyway, like AutoHotKey, DevCon is a powerful little software and Microsoft’s got a great write-up about it plus many examples at their Dev Center website.

A.) We’ll start by downloading the latest version of DevCon. Like I said above, if you want, you can head over to the Microsoft Social Technet Page and follow their instructions on extracting the tiny DevCon.exe from their huge Windows Driver Kit. Or (while I can’t promise to keep it up to date) I’ve linked the extracted file to my DropBox account. Your call.

B.) If you downloaded the file from my DropBox, check the md5 sum against this code for the zipped file: 9e2856cbb7853b2fb9306fb2924bc249

C.) However you acquired it, once you have DevCon.exe, you’ll need to place it in a folder where it can live forever. Once we’re done with these instructions, this is the program we’ll be calling to do our heavy lifting. Just for reference, I placed mine in my personal folder at: c:\users\michael\devcon, and in the future I’ll refer to this as ‘Your DevCon Folder.’

That’s it. We don’t have to install DevCon as the program is a stand-alone. If that’s confusing, don’t worry – you’ll understand in a few minutes.

Back to the Short Version



Step 3.) Creating the mouse_list.txt File

Once we’ve got DevCon.exe stowed away, we’ll need to ask it to give us a list of all the mice (touchpads are ‘mouse’ devices) and their device identification numbers. Think about it like this; Windows needs the touchpad’s phone number so that it can call the touchpad and tell it it’s time to go to sleep, but before we can find the right phone number we need a list of all the numbers associated with the name ‘mouse’ in the computer. To generate this list:

A.) Open a Command Prompt window with administrative privileges.

Hit the Windows Key and type ‘cmd’

NOTE: For DevCon to function properly, it needs access to the computer’s lower-level functions, hence running this window (and later our full program) in ‘Admin mode.’

HINT: On most Windows PCs, once you find the ‘Command Prompt’ icon, you can right-click on it and select Run as Administrator. If you’re still confused, there’s a great walkthrough over to Technet. Read all about it.

B.) Now that we’ve got our Command Prompt window open, let’s navigate to the folder where you placed the DevCon.exe file.

For me this was done by typing in ‘cd’ and then the path to my file that I mentioned earlier ‘c:\users\michael\devcon’ You can see it clearly in the window below.

C.) Once we’re in the correct directory, we’ll need to tell DevCon to give us our list of mouse device IDs. You’ll type in the command below to tell DevCon to use its ‘Find’ function to find and create this list. Specifically, you’ll want to type:

devcon find =mouse > mouse_list.txt

What do these things mean, you ask? I’m glad you did. They simply mean:

1.) devcon – tells the command prompt we want to use the devcon program.

2.) find – tells DevCon that we specifically want to use its Find facility.

3.) =mouse – tells the Find facility that we want to find only mouse devices.

4.) > – tells DevCon that we want the list of devices written somewhere specific.

5.) mouse_list.txt – tells DevCon that this specific place should be a text file called mouse_list.txt

6.) For a simple explanation see: DevCon instructions

7.) For an in depth discussion, see: Microsoft’s Dev Center DevCon Page

D.) The resulting ‘mouse_list.txt’ file will be placed in your DevCon directory, and the command window should look something like this:

NOTE: We could just as easily ask DevCon to find and output a list of all the devices on our computer. To do this, just replace the ‘=mouse’ with the wildcard argument ‘*’ as seen below. We don’t do this here because the list contains over one hundred items and can be a lot to look through.

A.) Open File Explorer and navigate to your DevCon folder. There you should find your freshly created device_list.txt file.

B.) Double-click on this file to open it, and take a look at what’s inside. It should look like the image below, with a list of device IDs on the left and list of corresponding device descriptions on the right.

NOTE: Just like any phone directory (well, US at least), there’s more than one Smith in this book. The list above has two mice listed: The first (in blue) turns out to be my touchpad. The second (red) is my Apple Bluetooth mouse that I use occasionally at home. It follows then that every mouse device that I’ve ever plugged into my computer will have its own device ID, as each one would need its own line of communication with the computer. It also makes sense then that if we disable the wrong device (say, my Apple Bluetooth mouse), we wouldn’t be able to tell until something (my Apple Bluetooth mouse) simply didn’t work. We’ll need to carefully isolate the precise ID for the touchpad, which brings us to our next step.

Back to the Short Version



Step 4.) Isolating the Touchpad’s ID

Now we need a way to test our IDs to isolate which one is associated with our touchpad. Using the DevCon functions ‘disable’ and ‘enable’ we’ll step through our list of suspect device IDs to figure out exactly which one controls the touchpad.

A.) The commands we’ll issue to test our suspect device IDs are:

devcon disable @”HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000” devcon enable @”HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000”

NOTE: The various parts of these commands can be described as follows:

devcon – Just like our Devon ‘find’ example in step 3, this tells the command prompt that we want to use the DevCon program. enable/ disable – Bolded above only for emphasis, tells DevCon that we want to either enable or disable whichever device that we tell it to. @”TEST_DEVICE_ID_GOES_HERE” – Tells DevCon which device to perform the action on. Here, the @ symbol tells DevCon to look ‘at’ the specific ID in quotes. For more examples, check out Microsoft’s Dev Center page.

B.) Working down your list of suspected device IDs, you’ll take turns turning things off, testing to see if they work (hopefully not), and then turning them back on.

HINT: When working in Command Prompt, you can hit ‘up-arrow’ on the keyboard to re-type the last command quickly. Then using the left and right arrows and delete, you can modify this command (changing enable to disable by deleting ‘en’ and typing ‘dis’).

This example below disabled a Bluetooth mouse, but not my touchpad…

By substituting the correct string (yellow boxes below), I had rendered my touchpad inoperable when the device was ‘disabled’ and turned it back on when ‘enabled.’ I had found my touchpad’s device ID. Now find yours.

NOTE: I believe these IDs are unique for every system. Though I haven’t confirmed this for many devices, I can report that the IDs were not similar across my 13”, and my wife’s 11” MacBook Airs, likely due to the different hardware.

C.) Once you have found your touchpad’s device ID string, make a special note of it. We’ll be using this in the script we write to turn the device on and off for us.

Back to Short Version



Step 5.) Building an Executable

This is without a doubt our longest step and the one that will likely cause the most ‘Hunh?’ moments, so I’m going to go over it very slowly.

Now that we have isolated our touchpad’s device ID, we’ll want to make a small program that turns this device on or off based on the device’s current status. This will require three major steps; A.) finding a way to check if the mouse is on or off (its ‘status’), B.) turning the mouse on or off, and C.) saving the program as an excecutable file that we can run as an administrator.

A.) First we’ll need to devise a way to check if the device is enabled or disabled (what we’ll call the ‘status’ of the device).

i. To their credit, the DevCon team made the first step very easy. They built a function into DevCon that outputs a file for the user telling them if the device in question is enabled or disabled. This command looks like:

devcon status @”HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000” > EnOrDis.txt

ii. This works in a very similar way to DevCon’s ‘find’ command in Step 3, only it outputs a text file with the current status of the device.

Here is the Command in action:

And the file output:

If we disable the device, and re-write the status file EnOrDis.txt:

The file then looks like:

The difference between the two being in the third line of the EnOrDis.txt file, which tells us if the device is running or disabled. Now that we know this, we can combine it with our knowledge of how to turn devices on or off. Then we can write a script to do all of this for us.

B.) If you’re unfamiliar with batch files, they’re simply very basic computer programs that are written in a text editor (for us, Notepad) and saved as a .bat file. While we won’t be actually creating a stand-alone batch file, the structure of our code will be the same as the format and commands which you would use to create one. These programs are basically the same as typing commands into the command prompt, only you don’t have to physically type them in every time. The program will do that for you.

NOTE: If you want to find out more about Batch Files, check this Wiki and Rob Vanderwoude’s web page on all things script.

1.) Before trying to type out a program, it’s always a good idea to think through what we’re going to ask the program to do for us. So, what steps do we want this program to take?

i. We want our program to start off in the directory where we keep the DevCon program devcon.exe

cd "C:\users\michael\devcon"

ii. Once there, we want our program to ask Devcon to write the current status of our touchpad device out to a file.

devcon status @"HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC& 0&0000" > EnOrDis.txt

iii. We then want our program to check if it can find the word ‘disabled’ in the file made by DevCon in the previous step.

findstr "disabled" EnOrDis.txt

iv. If our program finds the word ‘disabled’ (indicating that the touchpad is disabled) we want it to ask DevCon to ‘enable’ the touchpad (or turn it on for us).

IF %ERRORLEVEL% EQU 0 ( devcon enable @"HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000"

v. But, if our program doesn’t find the word ‘disabled’ (indicating that the touchpad is enabled) we want it to ask DevCon to ‘disable’ the touchpad (or turn it off for us).

) ELSE (

devcon disable @"HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000"

)

2.) Let’s open an instance of Notepad. (It’s usually found under Start -> Programs -> Accessories, but you can find it quickly by typing ‘notepad’ into the start menu’s search bar.)

i. Copy and paste from ‘cd’ to the final ‘)’ into your open Notepad window:

cd "C:\users\michael\devcon" devcon status @"HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000" > EnOrDis.txt findstr "disabled" EnOrDis.txt IF %ERRORLEVEL% EQU 0 ( devcon enable @"HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000" ) ELSE ( devcon disable @"HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000" )

ii. Modify the “C:\users\michael\devcon” to reflect your path

iii. Modify the device ID string “HID\VID_05AC&PID_023F&MI_01&COL01\7&D8303FC&0&0000” to reflect your touchpad’s device ID.

NOTE: You need to do this in all three locations of your code (status, enable, and disable).

HINT: In order for the program to function, formatting is very important. Even small alterations to the flow of the code or syntax can result in errors. If you get lost, check your file against the image below, or download my sample file (md5: 11ae75d842248932c3a48f522cf01c42) for comparison. For further information, see the Batch File Wiki, or SS64’s page on Batch Commands.

HINT: Here, the ‘findstr’ command is telling the command prompt that we want to look for the string ‘disabled’ in the file EnOrDis.txt. If findstr finds the word ‘disabled’ in the file, it sets what’s known as the ‘error level’ to a value of 0 (In other words: I found it. zero problems.) If it does not find it, it sets the same error level to 1 (Or: I have an error, I can’t find that here.) The code section that follows simply tells the program what to do based on this information.

3.) The only thing left for this step it to save the text file to your DevCon folder. While you won’t need this file when we’re done (we’ll turn it into an executable in the next step) it’s small and doesn’t hurt anything to have hanging around for reference.

4.) Take a break. Stretch. Focus on something in the distance to relax your eyes. You’ve come quite far! Now you’ve got some code that can turn your mouse on and off. Next we’ll put it some place where we can make it useful.

C.) Now we need a program that we can tell to ‘Run in Administrator Mode’ every time it runs. We need this because Windows (for security reasons) is picky about just who it lets do what. The software we’ll use to accomplish this is Advanced BAT to EXE Convertor (Alternative CNET Download) which (just like it says) will take the code that we’ve written and create what’s known as an executable file, which we can run as the Administrator. If you haven’t already, download the software from the link above and run it. Advanced BAT to EXE Converter should install in seconds. Once it does:

1.) Run the program to open up a new instance. It should look like:

2.) Remember the Notepad window full of code that we left minimized in part B.) just above? Find this window and copy all of the text.

Hint: Once you have the window called up, you can use the keyboard shortcuts ’Ctrl.+a’ to select all of the text, and ‘Ctrl.+c’ to copy it.

3.) Once you have copied the contents of the Notepad window to the clipboard, select the Advanced BAT to EXE window and past the clipboard contents ‘Crtl.+v’ to the line directly below ‘@echo off’ You should have something that looks like this:

4.) Next, click on the Build EXE icon highlighted in red in the image above. This will bring up the Save EXE dialog box. Browse to your DevCon folder and give your program a name. I chose EnaDis.exe.

5.) Once you click Save, you’ll be presented with several options for your file. I’m not sure what most of these do, but I do know that I don’t want a bunch of pop-ups every time it does. If you’re like me, Place a check in the box that tells the executable that you want it to ‘Start Invisible’ (unless you want a nice pop-up every time):

Accept the warning that comes with running a program in ‘invisible’ mode.

And viola, you should have an executable in your DevCon directory.

Back to the Short Version



Step 6.) Setting the Executable to Run as Administrator

Here we’ll tell Windows that we always want this program to run in Administrator mode.

A.) In File Explorer, navigate to your DevCon folder, find the EnaDis.exe, and Right-click on the program’s icon. This brings up the file options.

B.) From the options list, select ‘Properties’

C.) This will bring up the EnaDis.exe Properties menu. On the Compatibility tab, click the ‘Change settings for all users’ box.

D.) Check the box near the bottom that says ‘Run this program as an administrator’ followed by ‘Apply’ and ‘OK.’

E.) Click ‘OK’ again to exit the ‘Properties’ dialog box

Perfect, now every time you run the program, it will run in Administrator Mode, and be able to turn the mouse on and off.

CAUTION: If you double-click on the exe that you created at this stage, you’ll turn off your touchpad. This isn’t a big deal if you have another mouse plugged in, but if you don’t you’ll have to ‘ALT+TAB’ through open windows and ‘TAB’ through these windows’ interiors.

NOTE: There’s one issue that makes this setup less than ideal. Every time you run the executable, you’ll be asked if you want to allow the program to make changes to the computer. This is a necessary evil at this point, but we’ll overcome it when we setup a Scheduled Task to call our AutoHotKey script.

Back to the Short Version



Step 7.) Linking the File to a HotKey Press.

In this step we’ll create the hotkey press that will run the executable file that we created in Step 6. To do this:

If you haven’t already, download and install AutoHotKey (Alternative CNET Download). The express installation only takes a couple of seconds and when it’s done you’ll be presented with this:

Chose ‘Exit’ for the time being. We’ll see how this is run momentarily.

A.) Building an AutoHotKey script is a lot like writing a batch file, first open a new instance of Notepad.

B.) Copy and paste the following AutoHotKey preamble into your Notepad window:

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.

; #Warn ; Enable warnings to assist with detecting common errors.

SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

C.) Next, below the preamble, enter the following line into the open Notepad window:

^!n:: Run "C:\users\michael\devcon\EnaDis.exe"

1.) This tells AutoHotKey that every time it sees you press the CONTROL (^), ALT (!), and n (n) keys it should run your program.

2.) Modify the path to reflect the location of your DevCon directory.

NOTE: Here, I chose the Control, ALT, and n keys for my button press, but you can choose from almost any combination imaginable. Just be careful that the key press you choose doesn’t already do something else. When I first tried this, I thought about useing the m (instead of the n) key. However, after testing Control, Alt, m in Microsoft Word, I discovered that this key-press inserts a comment. If you’re curious about other key combinations in AutoHotKey, or Microsoft Word hotkeys, just follow the links for more info.

D.) Now, type in the following line (or copy and paste):

IfWinExist alert window Send !Y

NOTE: This tells AutoHotKey that, if it sees an alert window (like a UAC alert), to automatically answer yes so that the window doesn’t bother you.

E.) Save the file using the ‘Save As…’ option, selecting ‘All Files’ in the ‘Save as type:’ dropdown, and save your script (in your DevCon folder) as ‘AutoHotKeyScript.ahk’

HINT: To edit a script file (like an .ahk file or .bat file) you can no longer double-click on them to edit them, as this will run them as scripts. Instead, to edit any script (AutoHotKey, batch file, or otherwise), right-click on the file and select ‘Edit’

Back to the Short Version



Step 8.) Set the AutoHotKey.exe to Run as Administrator

In order to call the AutoHotKey script we created above without setting off any warnings, we need to set AutoHotKey.exe to always run as an administrator for all users. To do this:

A.) In File Explorer, navigate to the folder location of your AutoHotKey installation.

Mine was C:\Program Files\AutoHotKey\ Alternatively, you could search your computer for the file.

B.) Right-click on the AutoHotKey.exe file, and (just as we did with our EnaDis.exe file in Section 7):

Click on ‘Properties’ Select the ‘Compatibility’ tab Click on ‘Change settings for all users’ Check the box next to ‘Run the program as an administrator’ Click Apply Click OK to close the Compatibility window Click OK to close the Properties window

Back to the Short Version



Step 9.) Create a Scheduled Task

Face it: Windows is a little quirky. If we double-click on our .ahk script at this point, the script will run and we’ll be able to press ‘CTRL+ALT+n’ to turn our touchpad off and on. But every time we run the AutoHotKeyScript.ahk file, we’ll come up against a Windows UAC alert warning. To overcome this, we’ll setup a Scheduled Task to call the AutoHotKeyScript.ahk file for us with administrative privileges whenever we log into our Windows account. No more annoying pop-ups, just a nice, clean hotkey. Let’s wrap this up.

A.) Open the Task Scheduler from the Start menu.

You can either:

Click ‘Start’ – ‘All Programs’ – ‘Administrative Tools’ – ‘Task Scheduler’

Or you can:

i. Click ‘Start’

ii. Type in ‘Task Scheduler’ in the start menu’s search box and hit enter.

B.) Once the Task Scheduler opens, click on the “Create Task” option.

C.) Our first stop will be the ‘General’ tab. Here you’ll want to do a few things.

1.) Give your scheduled task a name.

I chose the ridiculously descriptive ‘AutoHotKeyScriptCall’

2.) Give your task a good description.

A few seconds spent on a good description can save a lot minutes down the road.

3.) Make sure the ‘Run only when user is logged on’ radio button is selected.

We choose this because there’s no point in letting our process run when no one’s there, and choosing another option can introduce known conflicts.

4.) Check the box next to ‘Run with highest privileges’

This is the setting that allows us to run the script as an administrator, without getting a nasty UAC warning every time.

D.) On the ‘Triggers’ tab:

1.) Click ‘New…’ to bring up the ‘New Trigger’ dialog box

2.) Change the drop-down menu at the top from ‘On a schedule’ to ‘At log on’

The default on my machine was for ‘Any user’ this should work fine and allow other users to run our script as well, though I haven’t tested this.

3.) Click ‘OK’ to close the ‘New Trigger’ dialog, and let’s move on to ‘Actions’

E.) On the ‘Actions’ tab:

1.) Click ‘New…’ to bring up the ‘New Action’ dialog box.

2.) Make sure the action selected is ‘Start a program’

This should be the default.

3.) Browse to the location of your AutoHotKeyScript.ahk file and select it.

4.) Click ‘OK’ to close the ‘New Action’ dialog box and move to ‘Conditions’

F.) On the ‘Conditions’ tab:

1.) Uncheck the box next to ‘Stop if the computer switches to battery power’

2.) Uncheck the box next to ‘Stop the task only if the computer is on battery power’

3.) Move on to the ‘Settings’ tab.

G.) On the ‘Settings’ tab:

1.) Leave the defaults in place

2.) Click ‘OK’ to complete the ‘Create Task’ wizard.

H.) Take a look at your brand new scheduled task.

And that should be about it. Barring any problems, you should be able to restart you’re computer, and (once it’s done loading) press ‘CTRL+ALT+n’ (at the same time) to turn your mouse on and off. If it works, great! If not, let me know what’s not working and I’ll see what I can do to help. I hope you found this tutorial interesting. If you have any comments or suggestions on how to make it better, please let me know in the comments section.

Later,

Michael

Resources & Links:

Required Software

Sample Files

Potentially Helpful Links