I'm trying to associate .appx files with a utility I wrote which needs a command line similar to appinstaller --install-only --force path\to\appxfile.appx. It also must run as an administrator

I tried looking into the registry and editing it, but I can't quite figure it out. What I've done so far is just use the built-in explorer association to associate with the file. This works and also pops up a UAC prompt as it is suppose to, but my program doesn't receive the --install-only --force command line bit

Are there any tools for Windows 8 to manage file associations, or an easy manual way to do it?


Windows 7 had two commands, ftype and assoc. I assume Windows 8 still has them (can't quite check right now).

ftype is used to associate a file type name (?) with a command string, e.g. ftype WinAppPackage=appinstaller --install-only --force %1

assoc is used to associate a file extension with the name, e.g. assoc .appx=WinAppPackage

Alternatively, you could link the file extension to a batch file using the Windows 8 GUI (Open With...). The batch file could contain the following:

appinstaller --install-only --force %1
| improve this answer | |
  • 1
    Windows 8 also has them. – Michael S. Oct 26 '12 at 15:58
  • The batch file worked wonderfully and is easy to change later if needed :) – Earlz Oct 26 '12 at 17:29
  • JFTR, Windows XP had these commands, too. – kostix Sep 19 '18 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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