Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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'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?

share|improve this question
up vote 6 down vote accepted

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
share|improve this answer
1  
Windows 8 also has them. – gentlesea 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .