Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I made an application that zips and puts any folder dropped onto it into backup folder on my disk. I'd like to be able to launch it with a parameter of a folder's full path via context menu.

How do I add my application to all folders' context menu and use the folder's path as a parameter in the command line?

share|improve this question
up vote 2 down vote accepted
Windows Registry Editor Version 5.00


@="C:\\MyApp.bat \"%1\""

The above saved as a .REG file and imported into the registry will run your app and pass the full path of the selected folder to it as the first argument. Here's the content of MyApp.bat for testing:

@echo off
for %%a in (%*) do echo Argument = %%a

Remove the MultiSelectModel line if you want the context menu entry to show up even when you select multiple folders and right-click.

However, this is more of a manual/hack-y method. I highly recommend you read the Creating Shortcut Menu Handlers MSDN article and ask over on StackOverflow about how to make your app's installer properly register your app as a valid context menu handler.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.