Back Up and Share Macro Profiles Without Losing Them

Macro files are small, which makes them easy to forget. They are also the product of hours of testing, and a tool update or a new PC can leave you starting again.

Quick answer

Copy each macro file to two other places before you edit or update anything, and strip passwords before you share one. Find the file first: Microsoft’s Mouse and Keyboard Center saves .mhm files in Documents\Microsoft Hardware\Macros, and scripts are plain text files wherever you saved them.

At a glance
Applies toWindows 10 and Windows 11
Time needed10 minutes to set up a routine
DifficultyBeginner
Cost$0, plus any drive you already own
Needs admin or internetNeither, for local copies
Last verifiedNovember 2026
  • By NewSoftwares.net editorial team
  • Published November 2026
  • Last verified: November 2026
  • 6 min read
Macro files being copied to a USB drive and a cloud folder with check marks
Locations

Where Each Macro Tool Keeps Its Files

Every tool stores macros differently, so the first backup step is finding the file. This table lists the storage format and location where an official source states one, and says plainly where none is stated.

Where macro tools store their files and how to export them
ToolWhat the file isWhereHow to copy it
Mouse and Keyboard Center.mhm macro fileDocuments\Microsoft Hardware\MacrosCopy the folder
AutoHotkey v2A plain text scriptWherever you saved itCopy the .ahk file
TinyTaskA saved recordingThe directory you chose in its Save dialogCopy the saved file
QMK or VIAA keymap fileYour configurator projectExport the keymap
Macro KeysA macro filePath shown on the Options screenExport Macros to File

The Three-Copy Rule

Keep three copies of any macro you would hate to rebuild: the working copy on your PC, a second on a USB drive, and a third in another place such as a cloud folder. Use at least two kinds of storage.

Three copies of macro files across a PC, a USB drive and a separate place
The three-copy rule.

The three-copy rule is simple enough to automate. Make the second copy before you update a tool, and the third whenever you finish a major change. Name each copy with the date so you can see which is newest.

A restore test matters more than a fourth copy. If you have never opened the backup on a different folder or PC, you do not know it works.

Back Up Macro Keys Macros

In Macro Keys, use Export Macros to File on the Options screen or in the editor to save a copy, and Import Macros from File to restore it. The Options screen also shows a macro data path under a MacroKeysData folder in Documents.

The Options screen groups its settings into general, clipboard and macro sections: start with Windows, clipboard use, an optional password to run the tool, a prefix box for triggers, and a Set Path button for the macro file. Multiple clipboard entries can also be cleared from that screen.

Because the tool offers a password to run it, note that password in your password manager. A backup file helps little if you cannot open the tool that reads it.

Macro Keys options screen with start-up, password, prefix, path and import and export settings
The Options screen, as shown on the product page.

Share a Macro Without Sharing Secrets

Before you send a macro to a colleague, remove personal data and credentials, name the file by task, note the tool and version, and ask the recipient to test it. Microsoft advises against putting passwords in macros at all.

Four steps for sharing a macro: remove secrets, name it, note the version, test it
Four steps before sending a macro.
Watch out

A shared macro runs with the recipient’s access. If it types into a finance or HR system, confirm they are allowed to run it.

Add a short text note beside the file: what it does, which tool and version made it, which window must be in front, and which hotkey starts it.

Protect the Backup Itself

A macro backup can hold snippets of addresses, phone numbers and other private text. Lock the folder or drive that holds it, and keep it away from shared folders.

On Windows, a folder-locking tool such as Folder Lock can encrypt the backup folder, and USB Secure can password-protect the USB drive that holds your second copy. Both are optional; the habit matters more than the product.

Test the Restore

A backup is only proven when you restore it. Copy the file to a clean folder, import it into the tool, run the macro in a blank window and compare the result with the original.

If a restored macro fails, the four-check order shows where to look, and the backup section of the main guide lists the short rules.

Common question

Questions About Macro Backups

Five short answers on file locations, moving to a new PC and sharing macros safely.

Where does Microsoft Mouse and Keyboard Center save macros?

It saves them as .mhm files in your Documents\Microsoft Hardware\Macros folder. Copy that folder to another drive to back them up. Microsoft also advises against saving passwords or other sensitive information inside any macro you create. Copy the folder again after you change a macro.

How do I move macros to a new PC?

Export them from the old tool to a file, copy the file, install the same tool on the new PC and import it. For scripts, copy the script file and install the same scripting engine, since a script depends on the version it was written for.

Is it safe to email a macro file?

Only after you remove anything private. Strip names, addresses, account numbers and especially passwords, then send the file as an attachment to someone you trust. A macro file is plain data that anyone who receives it can read or edit. Name the file clearly so the recipient knows what it does.

How often should I back up my macros?

Back up before every tool update, after any macro you cannot easily recreate, and at least monthly if you change them often. A copy made before an update is the one that saves you when the new version changes its file format. Date each copy in its file name.

Can I back up macros stored inside a keyboard?

Yes, through the configurator. VIA and QMK let you export the keymap as a file, and QMK stores static macros inside keymap.json. Save that file, because the device itself is not a backup. Keep a second copy on another drive.

Export and import typed macros, free

The Macro Keys product page offers a free download, and its Options screen is where saved macros are managed.

Download Macro Keys free →