New Platform 12.0.5. Download or Buy on Drive
Over 300 free and legal portable apps including MediaInfo (Jan 15, 2015) needs your help: Please donate today


- September 10, 2008 - 3:09pm
Share on Facebook

Application: PortableFileAssociator
Category: Utilities
Description: PortableFileAssociator will add file associations to all drives, all files, all folders, the recycle bin, or to a specific filetype.

Help is available in the Readme.txt file in the 'App\portablefileassociator' directory.

Download PortableFileAssociator [614KB download / 541KB installed]
(MD5: aee86cb2670b8c04b0461ce3343f2e04)

Download Standalone Icon Rebuilder [288KB download / 326KB installed]
(MD5: f8cb245060b369ed9b36246e93ab4483)

Release Notes: (2010-01-10)

  • Packaging changes Development Test 1 (2010-01-09)

  • Fixed association delete didn't work
  • Updated to PA.c Format 1.0 Development Test 1 (2010-01-06)

  • Bug fixes
  • Added INI based command line arguments
  • Replaced Registry Backup / Restore with System Restore
  • Added 256x256 icon Development Test 1 (2009-09-09)

  • Changed internal version check URL to new hosting Development Test 1 (2009-06-19)

  • Fixed a Vista+ only function, replaced with XP+ version Development Test 1 (2009-06-18)

  • Added SendTo configuration Development Test 1 (2009-06-16)

  • Added update check (pings google to check for internet access)
  • Fixed combo box sorting
  • Tweaks to the method of selecting a host defaut association
  • Added option to allow a host default association, if one exists, to take precedence over a PFA default association
  • More internal changes / optimizations Development Test 1 (2009-06-11)

  • CRITICAL FIX: Fixed a bug in the function that creates the full path from the relative path stored in the INI (internal AutoIt distribution bug) Development Test 1 (2009-06-11)

  • Renamed some of the dialogs and added tooltips for clarity
  • Added option to disable an association
  • Added option to copy existing host associations for an extension
  • Specifying a default PFA association is now extension specific
  • Moved all extension specific options to the File Types configuration page (renamed from Icon dialog): default PFA association, copy host associations
  • Added INI versioning to better manage configuration changes after upgrades Development Test 1 (2009-05-05)

  • Added special support for shutting down the computer while PFA is active
  • Revised minimize-to-tray support (again) Development Test 1 (2009-04-08)

  • Fixed XP 'New' menu items disappearing bug
  • Fixed profile names allowing illegal characters
  • Few misc bug fixes Development Test 1 (2009-04-01)

  • *NEW* Full profile support Development Test 1 (2009-03-27)

  • Added mode for drives - 'drives'
  • Automatically add "%1" to end of command after using browse button
  • Added context help to association dialog Development Test 1 (2009-01-27)

  • Fixed stuff I broke Development Test 1 (2009-01-26)

  • Fixed a few New Items context menu problems on XP Development Test 1 (2009-01-26)

  • Improved minimize / restore and New Items context menu Development Test 1 (2008-09-18)

  • Fixed minor commandline bug (invalid arguments would still exit a running PFA instance) Development Test 1 (2008-09-17)

  • Fixed bug with 'add_gui' commandline option (GUI would show instead of starting hidden) Development Test 1 (2008-09-10)

  • Significantly improved 'New Items' file creation performance
  • 'New Items' files moved to mouse position when on Desktop Development Test 1 (2008-09-10)

  • Added commandline option 'exit' to close a running instance of PFA (scripters rejoice!)
  • Changed the way the 'New Items' context menu is created so there's no longer a 'dummy' application in Task Manager
  • Smaller executable size Development Test 1 (2008-08-09)

  • Fixed path reading bug when quotes were present Development Test 1 (2008-08-05)

  • Fixed quotes being stripped from the commandline when re-saving
  • Fixed main GUI lost focus after registry backup / restore functions
  • Fixed association looked like it was saved if the name was blank
  • Changed registry integration - now a new filetype is created for each file extension, bypassing any local settings
  • Changed some association GUI labels for clarity
  • Changed user is no longer responsible for the extra ' (single quotes) around commandlines
  • Changed commandline and icon paths are now stored as relative paths, relative to the PFA application directory. This greatly improves portability.
    NOTE: Make sure the FIRST TIME you launch this version that it is located in your normal working location, or you risk corrupting your INI files.
    For example, if you normally run PFA from 'X:\PortableApps\PortableFileAssociator' then make sure you run it from the same relative location to your drive root the first time, so that the relative paths are correctly converted. After the first run, this restriction no longer applies. Development Test 1 (2008-07-24)

  • Fixed disappearing "New->" menu items in Vista
  • Added dynamic custom "New Items" menu Development Test 1 (2008-06-02)

  • Fixed main GUI losing focus when closing a sub-GUI Development Test 1 (2008-05-19)

  • Fixed default icon setting bug Development Test 1 (2008-05-13)

  • Constrained the icon index to negative numbers in the PFA GUI, this should fix incorrect icons being displayed with some resources (ie ICL files) Development Test 1 (2008-05-12)

  • Browse button in the Icon Edit GUI now opens the Windows icon picker dialog
  • Organized source code a little better Development Test 1 (2008-05-09)

  • Fixed 'folders' option no longer adds associations to the Recycle Bin
  • Revised the way the icon refresh is done
  • Renamed the tray option 'Refresh icons on change' to 'Rebuild icon cache on change' to follow this change
  • Tray option 'Refresh now' follows the 'Rebuild icon cache on change' setting, otherwise only sends SHChangeNotify() message (no change on Vista)
  • Disallowed installation if associations are active (requires 'state.ini' from the previous installation to be present) Development Test 1 (2008-05-06)

  • Fixed error if no association is paired with a specific filetype
  • Added option to hide the extension of any filetype
  • Added correct handling of Favicons for the URL filetype (Internet Shortcut) Development Test 1 (2008-05-05)

  • Fixed error on start of new installation Development Test 1 (2008-05-05)

  • NEW!! Icon Edit dialog. Set custom icons for each filetype.
  • Association paths now show the drive letter. Conversion to/from the 'PDRIVE' token is done transparently.
  • Some code cleanup Development Test 1 (2008-04-17): Initial release

Notes: This app writes to the HKCU\Software\Classes key in the registry, so it should work under limited accounts.

By Windows behavior, associations made in the HKCU branch override those in the HKLM branch. Associations to a filetype take precedence over associations to all files (*). Take this into account when creating multiple associations for a filetype.

Be careful when making associations to script filetypes, ie BAT, VBS, etc. You may lose the ability to execute them by double-clicking unless you recreate that association as well. Critical filetypes EXE and COM are excluded from being modified.

( categories: )


Updated to v2.1.8.5. See first post.

Latest Version not Working.

Clean Install,

Nothing in the text files,

I launch PFA,

in the association GUI, i click browse, then choose my text editor, save, and I open to look at the assoc.ini file, here is what pfa put in it :

title=|| Open with Notepad
command='..\TedNPad\TedNPad.exe "%1"'


When i enable the PFA. There is an error when i click on a txt file :

This file does not have a program associated with it for performing this action. Create an association in the folder options control panel


So what am i doing wrong ?

recycle on windows64

Hey guys, Been using this since day 1 almost. Until now still.

I recently upgraded to windows64.

This used to work on 32bit

title=PFA - Clean With CCleaner
command='..\CCleaner\CCleaner64.exe /AUTO'

It doesn't anymore on the new 64bit.

anyone knows of a workaround ?

Looks good

If I understand correctly this works the sme way as CAFE Mod/Expresso. Right?

Is it possible for this to make it so that while the app is running firefox and thunderbird portable become your default browser and email client? Advocate

Not exactly. It modifies

Not exactly. It modifies HKCU registry keys to reassign file extensions to open with apps of your choice. So you can make .txt files open with Notepad++Portable, for example.

Changing the host computer's default browser or email client is a different process and currently PFA does not do this. You could however assign .htm, .html, and .url files to open with FirefoxPortable. This doesn't change the default browser though, so any program that calls the system's default browser will still open the registered browser.

Also, the app can remain running, but is not required for functionality. See the readme for commandline and other options.


Can I ask how this differs from Cafe Mod? I'm honestly too dumb to know. I think based on your response that they both perform overall the same function but do so through different methods. Is this correct? If so can you explain how Cafe functions.

Also for constructive criticism from my PC dunces point of view, I was unable to work out how to add associations in PFA. I don't know nada about commandline if thats a pre-requisite. Maybe some sorta link to a youtube demo? Though both very plain, PFA's GUI does look neater than Cafe's but on the other hand I actually can use Cafe Mod. I look forward to seeing both these apps proceed in their development and hope eventually are integrated into the PAP itself.

Good luck Smiling Advocate

Permanent assocaition

Is there a way to make the associations permanent? What I want to do have an exact copy of my USB apps on my PC too (in case I forgot/loose it). I would have the home pc by default associated with c:\apps and then when you plug in the USB it would take the associations on any PC. Hope this is making sense...Thanks!

That's not the job of PFA.

That's not the job of PFA. Use the Windows file association tool for your purpose.


See first post.


Minor update to v2.1.8.7. See first post.

Hi Wraithdu, since the last

Hi Wraithdu,

since the last update of AntiVir, PFA get a false positive message.
PFA has signatures of the Backdoor software "BDC/Funpic.A".......

Kind Regards

PS. I love all your apps ,they all very useful!

Hell was full, so I came back!!!
Sorry for my lousy English!!!

AntiVir (while I like it as a

AntiVir (while I like it as a free AV) is one of those that likes to tag AutoIt apps as false positives from time to time. Nothing I can do on my end, sorry Sad

Can I suggest an about

Can I suggest an about button to showing what version number it is and all the other info eg a wraithdu creation ;p Advocate

the version number you can

the version number you can see on the bottom left....

Hell was full, so I came back!!!
Sorry for my lousy English!!!

Thanks hadn't spotted it.

Thanks hadn't spotted it. Time to update from Smiling Advocate


Is there a way to integrate pfa so that the context menu can use winrar command line to unrar and rar files ?

I am using a portable winrar and would like to associate the compression tools to it, instead of opening it, adding the files and using the options to compress.

any ideas ?

That depends on WinRAR. If

That depends on WinRAR. If it has a commandline mode, then you can set up an association to at least open archives.

Creating archives is more difficult, since when you invoke a context menu on, say, 5 selected files, then unless you're using a true shell extension (DLL) then the command is invoked 5 times. Meaning you'd launch 5 instances of whatever program the command is associated with. This won't work for creating archives.


Where'd you get winrar portable?

Siggys waste bandwidth... that's why I have one.

WinRAR Unplugged

WinRAR Unplugged

But it's not really 100% portable, since they left the options for shell integration in there. It can mess with a locally installed version and leave stuff behind, etc., if you use those features. Still requires a valid license to register it.

Opens files or just apps?

I got PFA to associate my odt and ods files to OpenOffice Writer and Calc respectively, but when I double click on my files it doesn't actually open the files. It just runs the associated app.

Is that all PFA does? I'm no developer, just a user so I had trouble following the readme. Did I miss something.

check setup?

The readme says in part

command = Commandline to execute.  The application path must be surrounded 
by " (double quotes) if it contains spaces.  Use the token (placeholder) 
"%1" to pass the path of the clicked-on file to the commandline.  Example -

  "X:\PortableApps\App Path\app.exe" "%1"

Do you have the %1 in the place where you set up the associations, as in the example?

I just skimmed the readme file, but I would say it needs a bit of work ... or "if the user needs to refer to the readme file, the application needs to be reworked".


That's a little harsh.

That's a little harsh. Anyway, the "%1" notation is standard windows stuff that's been around forever. I think the readme is pretty clear.

It ought to be "If the user needs to refer to the readme, and is annoyed by this, the user should go buy some legos."


It may have been a bit blunt, but I think harsh is too harsh a word. Sticking out tongue

If we are making a product that mere mortals can use, they shouldn't have to come pre-equipped to know that you need to put %1 after the file name, and put it in quotes.

Take a look at OpenExpert from It assumes unless told otherwise what you will need on the command line. So all the end user has to do is point at the executable and most of the time it will work. (Most of the time you need the %1 or its equivalent on the command line, and almost all the rest of the time having it there doesn't matter and doesn't make it fail.)

Another option is to put an example in plain text above or below the field and say "copy this format" in addition to in the readme file. I think we can expect mere mortals to copy something that's on the screen, even if they neglect to open the readme file and/or comprehend its meaning.

Expecting them to be able to read and understand a README.txt file and remember its details to type accurately on a different screen means one is programming for a very limited and elite group. If that's the case, fine, but put a warning at the top of the screen saying "only for geeks, regular users shouldn't try to figure this out." And I'll include myself in the "non-elite" group if only because I'm too lazy to try to copy a format like that accurately (assuming I haven't been using it for twenty years already).

And by the way, I think PortableFileAssociator is an excellent idea and well executed (aside from support for novice users). I'm offering my thoughts on the readme file and usability because I think it would be helpful even for those you would relegate to the Lego box. Sticking out tongue


I liked my Lego quip :) I'll

I liked my Lego quip Smiling

I'll take a look at making that particular interface a little easier to use. It's hard though, because every computer is going to be different, and every user is going to have different needs. Placing an example below that box is a good idea though. Maybe I'll add the %1 after the user browses for an EXE just to be safe.

Add %1 if its not already there?

How about adding %1 if its not already there? That way more complicated setups can be done. Can't think of any off hand, but I know I've done them...

If I may interject...

I think the disc burning application ImgBurn can provide inspiration for a compromise. If you don't specify a label for the disc, it pops up a box that says "I see you didn't provide a label for this disc, but since I'm a nice program I'll give you another chance to do so here" and then it prompts for the label. It's pretty slick.

Now are you guys saying that some apps require the %1 to be there and others do not? Maybe there's some way the app can test the waters before finalizing the settings, if I understand all this right. If it works without the %1, great, we move on, nothing more to worry about. If however it doesn't work right (and maybe even ask the end-user "Did it do what you expected?") then pop up something like "Sometimes Windows requires a token/placeholder called %1 to be added, I'll go ahead and add that for you".

Computers used to be for businesses only, which is why they're traditionally so wooden, so straight-and-narrow. Now that social networking has overtaken email in global net traffic, isn't it time software lightened up a bit? Then again, file associations isn't a task for MySpacers (great quip about the Legos) but still, it's gotta start somewhere.

Interesting idea, but I don't

Interesting idea, but I don't think it can be implemented as you describe. PFA has no way to interact with the processes that are launched by its changes. In fact, it doesn't even have to be running since it only has to make the registry edits. Every program that is meant to interact with a double-clicked file or a right-click on a drive, folder, or file, must use the "%1" notation to pass the name of the drive, folder, or file to the launching program. More advanced setups use a communication protocol called DDE, but PFA doesn't support this.

I think the best compromise is the recent change I made, which automatically adds "%1" to the commandline when the user uses the browse button, and to include an example commandline below the input box.

%1 = the file you're opening.

%1 = the file you're opening. 99% of the time it's safe to assume it just goes at the end, but OCCASIONALLY a program requires more information, so an association might be something like " -c %1 -u "

That's probably why it's written not to just assume a standard %1 even though most users would never have a problem with that.

drive letter


this tool looks very handy for USB drives, I played a bit with it, and had no problems using it. There is only one problem with these drives, the changing drive letter. What do you think about an option in the associations dialog, to change the drive letter of associated applications to the drive letter PFA resides in?
Assuming that PFA will be on the same stick as the portable apps, this could easily be used to determine the path to be used for the assoc reg settings. On startup, PFA would read its own location, and use the corresponding drive letter for associated apps if the flag is set.

Edit: oops, silly me, I didn't realize that you are working with relative paths already (looking at assoc.ini), so please forget my unnecessary post =:)



When I minimize PFA, it's outline remains on the desktop. Could that just be a function of incompatibility with my desktop theme?

Not sure what you mean.

Not sure what you mean. Screenshot?


Updated to v2.1.8.8.

Please try this version. I made some changes that may affect your problem.

From this version forward, if PFA does not minimize to tray icon (ie the toolbar button remains on the taskbar), please report this as a bug and let me know what operating system you are using. Thanks!

Just upgraded to from

Just upgraded to from & now the toolbar button remains on the taskbar when minimized Sad XP SP2 here.

Back to Thanks for the great program though. Makes all the other ones usable!


v2.1.8.9, see first post.

I can't reproduce this issue on my XP SP3 box at home, or my XP SP3 VM. I don't *think* the toolbar classname would have changed from SP2 to SP3, but I guess I need you to verify that.

So if you can, plase download the AutoIt3 zip package from this page -

Extract the file 'Au3Info.exe'. Start it up, click the tab that says 'Control', then click on the taskbar. Find 'ClassnameNN' in the 'Property' column, and tell me what the value is. It should be 'ToolbarWindow322' (the screenshot is from Vista where the ClassnameNN is different).


I did as you asked & the

I did as you asked & the value is, as you said, 'ToolbarWindow322'.

I assume then that

I assume then that doesn't work for you either?

At the moment I don't know why it isn't working. As I said it works on a couple SP3 machines I've tested. I'll see if anyone at work still has SP2 and give it a try. Either way, the current solution is better than the last one which relied on setting window transparency. That method would have issues on desktops less than 24-bit color, and apparently with some Windows themes.

I'll keep doing some research and see if there are any better methods.

Yes, does the same as

Yes, does the same as I'll stick with for the moment as it's working OK for me. Thanks again.

Well I've tested on an SP2

Well I've tested on an SP2 machine, works like a charm. Are you running any custom desktop themes / addons / whatever? has some significant improvement as far as the New Items menu is concerned. If you use it, I suggest updating. If not, there's no other significant changes from

@prapper Can you try this

Can you try this test program and see if it hides the toolbar button? Thanks.


I don't have anything unusual

I don't have anything unusual on the desktop that I'm aware off. When I run I can click on the toolbar button to make it disappear. I never see the GUI.

Yes, messes up the New Items menu and I do miss it but can live without it. I don't notice any change with I still only get 'Briefcase', 'PFA_txt File' and 'Compressed (zipped) Folder'. I have the six dummy files in 'Data\newitems'.

I tried your program & it does hide it's own toolbar button.

Hope this helps.

Ok, so you're using the

Ok, so you're using the 'add_gui' commandline option. I just noticed that I broke that...

Regarding the New Items...I'm NOT referring to the windows desktop "New..." menu (that still gets goofed up and I haven't been able to fix it, it seems like a windows bug). I mean the one I built into PFA. Check the readme. It's activated via hotkey on either the desktop or in windows explorer. Default hotkey is Ctrl+Shift+A, you can change it from the Hotkey option in the main GUI.

Try v2.1.9.0, which I'll post shortly. Everything should be fixed and working now.


I think I fixed everything I broke now. Thanks for bearing with me everyone.

That's the one :-) I did know

That's the one Smiling

I did know about the built-in 'new' menu but never really got used to it. To be honest, the only 'new' file I ever create is a text file and it doesn't really matter what it's called because the name is changed immediately but I have tested it again (after changing the hotkey from the old Ctrl+Shift+N) and it's working great.

Thanks again for this fantastic program...


The new version fixed my problem. Thanks.

I figured it would. Good to

I figured it would. Good to hear!

AVG Antivirus

Probably a false positive but thought you should know that AVG Antivirus reports the exe file is infected with Trojan horse Startpage.DOI

Yep, false positive. It's a

Yep, false positive. It's a good idea to run anything suspect (ESPECIALLY from a free AV) through VirusTotal or Jotti.

Feature idea: different profiles

I've been using PFA with my portable hard drive and would like to suggest a new feature:

At work, we purchased Acrobat Professional and Microsoft Office while at home (or in general when using different PCs) I always use OpenOffice/a portable PDF Viewer. I'm sometimes forced to use those programs and thus need to remove all associations, process the files and re-add the associations again...

Now my idea is the following:
- let the user create profiles, saved f.e. by using the computer name (and maybe login name)
- in the association dialog, create two new edit boxes to include and exclude the assoc to specific profiles (same way multiple file types are handled)
- if the include field is empty (default), the association is used in every profile

This way (or somehow similar) I could just exclude PDF and Office types at work leaving the OO-formats still working there while f.e. Sumatra PDF Viewer and OpenOffice open all those formats on every other computer.

The include field would furthermore enable the possibility to use different programs on different computers, though at the moment the only useful setup I can think of is having different programs as default on different computers, using hardlinks to programs on the host computer or switching between 32bit and 64bit versions on programs where the loader doesn't support it...

BAT File and Send To Menu

I have been using a BATCH file for a long time now. Created a shortcut in the send to menu and I have been using the files and folders on it a lot.

Right click and send to, and send to the batch file ".bat"

Is it possible to reproduce this same behavior with PFA using the %L and %1 ?

thanks for your replies

For single files only, yes.

For single files only, yes. The way the explorer shell works, the command you use is run once for each selected file, while SendTo sends all files on the same commandline. This is not something PFA can change.


command - "C:\path\batch.bat" %1
selected files - file1, file2, file3
result (run individually) -
"C:\path\batch.bat" X:\path\to\file1
"C:\path\batch.bat" X:\path\to\file2
"C:\path\batch.bat" X:\path\to\file3

result (run ONE TIME) -
"C:\path\batch.bat" X:\path\to\file1 X:\path\to\file2 X:\path\to\file3

Windows desktop's Icons mess when using PAF Dev


I'm Using PAF Dev on XP.

Activating and deactivating PAF's File associations reset my desktop icons positions (i.e. 'My Computer', 'Recycle bin', any shortcuts, files or folder I have on my desktop)

Am I the only one observing this behavior? Is a fix comming for this?


Do you have the "Rebuild icon

Do you have the "Rebuild icon cache on change" option enabled from the tray context menu?

The issue you describe has to do with that procedure, and was fixed a long time ago. If you don't have that option enabled, then I'm not sure what to suggest, as I haven't had that problem ever since I fixed it the first time.

XP ... 64

Enabling the "Rebuild icon cache on change" cause the problem.
So, disabling it is a solution for me.

You already fixed this... well, indeed, my previous post wasn't complete:
I'am using PFA Dev on Windows XP 64.. I guess the '64' may be the explanation.

By the way, is it possible to hide PFA window, so only PFA icon in taskbar remains visible?

Other question, is it possible to pass some arguments to PFA executable itslef?
so I could things like this:

PortableFileAssociator.exe -addFileAssociation -hideGUI
PortableFileAssociator.exe -removeFileAssociation -showGUI

My goal is to add command lines in my USB HD autorun.inf to customize my HD right click menu

like this:

shell\1_ASuite=ASuite Menu
shell\1_ASuite\command="F:\PortableApps\ASuite 1.5.2\asuite.exe"
shell\2_PFA_Enable=Add File Associations
shell\2_PFA_Enable\command="F:\PortableApps\PortableFileAssociator\PortableFileAssociator.exe -addFileAssociation -hideGUI"
shell\3_PFA_Disable=Remove File Associations
shell\3_PFA_Disable\command="F:\PortableApps\PortableFileAssociator\PortableFileAssociator.exe -removeFileAssociation -hideGUI"


Yes, 64-bit would be the

Yes, 64-bit would be the problem. The desktop is just s ListView control, so the commands I use to reorder the icons probably fail. I have nothing that is 64-bit, so this will probably go unfixed. Frankly, I'm surprised PFA works at all Eye-wink

Again, 64-bit is the issue. PFA already does what you ask (minimize to tray), but it depends on the 32-bit window and control names which I'm sure are different on 64-bit platforms, and reading from explorer's memory which will be different as well. Now, there's a 64-bit compiler for AutoIt, but without a 64-bit system to test I'd be flying blind.

Read the readme file section "Modes of Operation" for commandline options.

It was 64-bit? I agree :-)

All those minors problems surely are related to 64-bit. Nevertheless PFA is still more than usable on XP 64, so I keep it Smiling

About the parameters, I should have RTFM... thanks for mentioned it so kindly.
So, I did what I planned to do (USB HD menu customization) and it works like a charm!

To all PFA users:
If I can gives you an advice, the trio PFA, Asuite and Rocket Dock is surely one of the best solution for great "portable apps user experience".

Interested? don't forget to make your custom :\autorun.inf as explained here

Here is mine:
; Setting AutoPlay Options
open="F:\PortableApps\ASuite 1.5.2\asuite.exe"
action=Launch ASuite Menu
; Naming Your USB Drive
;label=My LaCie
; Setting a Custom Icon
;icon="F:\PortableApps\RocketDock-portable-1.3.5\Icons\Flat for PC\USB HD.ico"
; Adding Context Menu Items
shell\1_ASuite=ASuite Menu
shell\1_ASuite\command="F:\PortableApps\ASuite 1.5.2\asuite.exe"
shell\2_PFA_Enable=Add File Associations
shell\2_PFA_Enable\command="F:\PortableApps\PortableFileAssociator\PortableFileAssociator.exe add_gui"
shell\3_PFA_Disable=Remove File Associations
shell\3_PFA_Disable\command="F:\PortableApps\PortableFileAssociator\PortableFileAssociator.exe exit"
shell\4_RocketDock=Rocket Dock
shell\5_Play_Music=Play Music
shell\5_Play_Music\command="F:\PortableApps\Winamp 5.541\winamp.exe"
shell\6_Watch_Video=Watch Video
shell\6_Watch_Video\command="F:\PortableApps\vlc-0.9.8a\vlc.exe --no-plugins-cache --config=\PortableApps\vlc-0.9.8a\vlcrc"
; Changing Default Action
; Viewing a File (instead of running a program)
; This is the equivalent of using Start - Run…

Last thing to do is to remove drive letter (F:) and it would be 100% portable.


Wraithdu, thanks a lot for this great app Smiling

So the \shell stuff lets you

So the \shell stuff lets you run that stuff from the rightclick context menu on the drive?
The only thing that loads on the autoplay is asuite, right?

About Menu customization (aka the \Shell stuff)

Check and you will have all the information you need.

By the way, I observed that menu items are sorted alphabetically that's why I use a "<number>_" prefix, which is not mandatory.


Right click association for drives

Maybe I'm missing something, but is there a way to associate drives ?
I mean, we can associate extensions and folders, but I haven't seen anyway to associate drive.
As an example, I do use the excellent search tool everywhere search. I'm able to associate folder to start a search from, but if I would like to start from a search on an entire drive, I can't for now.
Is there a solution for this ?


At the moment, no. I'll add

At the moment, no. I'll add it in the next update.

Thanks for your answer. I

Thanks for your answer.
I know it's a bit abused but any planned date for this release ?


Sorry, been busy yadda yadda.

Sorry, been busy yadda yadda. I'll get to it in the next week or so.


Updated to v2.1.9.1, including most recent requests. See first post for details.

Mr Wraithdu thanks a lot

Mr Wraithdu thanks a lot

My pleasure. I'm also still

My pleasure. I'm also still toying with Hyalian's idea of profiles and a good way to implement it. If I can figure out something I like, it'll be a really nice addition to the program (maybe warrant a jump to a bigger version number Laughing out loud)

Nice version :) *thumbs

Nice version Smiling *thumbs up*

I've thought of a simpler idea which might achieve the same.

Instead of giving complete profile support you could use the computer name (and of course a field added to every association) to figure out if the "default" checkbox should be ignored.

As an example: I would add two computers called "PC64" and "PC58" in this text field (using "PC64|PC58" as string) and PFA would not set the association as the default one, even if the checkbox is checked.

Back to my previous example it would ensure that I can launch OpenOffice and a portable PDF Viewer by default on every computer but those two, while still having access to the portable versions using right-click on pdf, doc, .. files.

What do you think? Smiling

I like the profile idea

I like the profile idea better. Doing anything based on computer names and exclusions seems inefficient and less useful. I like the idea of being able to build profiles that are then arbitrarily selectable.

I'm happy with both and glad

I'm happy with both and glad you're thinking about implementing any of those ideas Smiling

I have two suggestions which you might consider to make working with profiles easier: allow profiles to be cloned (so you can create a general profile and modify clones to your needs) and make a command line parameter to start a profile directly.

Thanks again and ... good luck Smiling

Both of those ideas were

Both of those ideas were already in my mental implementation plan Smiling


Updated to v2.2.0.0, now with full profile support in the GUI and commandline.

Very fast!

Nice ... just saw the new release (Test-Release page not updated yet), will try out tomorrow and post test results then.

so here is v2.2

Great! Will try that ASAP.

Keep on developing it, it's great.

By the way, could you find a way to have the "New Item feature" available in the windows explorer "New ->" menu?

and also have the
Windows XP:
Filetypes for which you have assigned a command will temporarily disappear from the Windows Explorer
"New->" menu while PFA is enabled.
This bug has been fixed for Vista.
bug fixed on XP?


EDIT - I'll look into the new


I'll look into the new menu again. I think I found a hack for XP (very stupid OS bug). I'll test and get back to you.

I'm not sure if I want to use the real windows New menu though for custom entries. I'd either have to create a bunch of extra reg entries, or copy the files to the user's 'Templates' directory. I'll think about it.

U're the boss

hack found... good news!

About the "New" Menu, it was just a suggestion: you are the boss Smiling
A solution that looks good to me would be to append PFA "New" entries at the end of the existing "New" menu. (I understand that you have to rebuild the menu yourself, including the previously existing "New" entries, but I'm just explaining things from a user point of view)

To be clear, here is my "New" menu without PFA:

New -> Folder
       Bitmap Image
       Microsoft Excel Worksheet
       Microsoft Word Document
       Text Document

And here is what it could looks like when PFA is enable:

New -> Folder
       Bitmap Image
       Microsoft Excel Worksheet
       Microsoft Word Document
       Text Document
       -------- (this separator tells the user that PFA "New" entries starts here)
       New Open Office Document
       New WinHTTrack Project

What do you think of this?


PS: By the way, v2.2 works fine for me (on XP 64, remarks from my previous posts are still valid )

I can't create a separator

I can't create a separator like that, there's no OS or registry way to do it. Actually, even using the 'Templates' directory will require extra registry entries.

I'm still looking at it though.

After a little more digging,

After a little more digging, this won't really be practical. The New menu entries are tied in to a file extension, so there can only be one new entry for any one file extension. To make it work would really require a whole new setup dialog similar to the icon dialog where you could define a New entry for each associated extension. I don't really see an advantage or wide demand for this, so I'm probaly gonna leave it as it's implemented now (with the bugfix hack thing of course).


So you took some time to consider my proposal.
Thanks Smiling

Profile test and another suggestion


I've tested the profile functions and they work fine on Vista 64 and XP 32. I really like the tooltip (PFA tray icon) which shows the active profile - nice idea!

You've caught most standard errors like using already existing names. But I noticed you missed one thing (actually the first thing I tried): when you create a profile, the window asks for a profile name and I tried: "no office / pdf", which will be shortened to nooffice/pdf and used as a filename, which is invalid ('/' character). PFA is unable to write the file (of course) but the profile.ini still sets the active profile to the invalid name. The result is the Error "Error reading INI file.".

The command line option works well for me. I'm not sure if it is a good thing PFA terminates when using add_gui with an invalid (non existing) profile as second parameter. Maybe you can give the error message (Invalid Profile) and open without adding anything?

A last thing (not related to the profiles), rather annoying but I'm not sure you can fix easily.. I usually enable "Remove associations on close" and stop caring about PFA because everything is handled fine. But sometimes I have to shutdown/reboot windows (e.g. windows updates, or when you have to leave in a hurry). Then windows sends a terminate signal to the active processes and PFA terminates but without calling the "remove" function.

So the next time windows starts you must launch PFA, first add, then remove the file associations in order to have the normal windows working again without a portable drive. If you don't do it, the associations are still for the portable software which might not be available at present.

If you need more stuff tested, just drop a line Smiling


I'll fix the illegal

I'll fix the illegal characters, good catch.

Your other issue though, is strange. Shutting down is like terminating the program with Task Manager or something. Either way, PFA saves its state in an INI and reads it on startup. If it's restarted in an active state, then the button to Add should be grayed, and the Remove button should be active. You're saying this is not happening? I tested here on my machine, and it works as it should. Try killing PFA with Task Manager while active, restart, and see what happens.

Perhaps shutting down the computer is slightly different than killing it?

Different Window Messages

I think it shutting down the computer is different.

If I recall correctly the system sends a WM_QUERYENDSESSION window message to all programs if a program or the user calls the shutdown function and if every Program returns 0 it will send the WM_ENDSESSION window message, which should again return 0 after handling.

Ah, I've found the pages I was looking for: WM_QUERYENDSESSION and WM_ENDSESSION.


Nice. I can work with that.

Nice. I can work with that. I'll handle WM_ENDSESSION to remove the associations.

So what happens currently during shutdown? PFA sets its state to 0, which means associations are removed, but the registry changes are not reverted? I would have thought PFA would end without doing either, like being forcefully terminated, and leave state set to 1 and associations active.

Can you try this build and

Can you try this build and see if it works for you?


What if the computer

What if the computer completly froze or shutdown due to power failure (like in not more electricity). Not everyone have an UPS to have a little energy to properly shutdown when there so more electricity.

What can happen then? Does the temporary change become permanante?

Restart PFA after you reboot

Restart PFA after you reboot and it should detect that the associaions are still active, allowing you to remove them. It would be like killing PFA with task manager or if it hard crashed.


See first post.

A few words about the XP New menu's annoying. Apparently in XP the ShellNew key (which is responsible for the New menu entry) is only honored if there is a 'shell\open' key for the extension's filetype with a 'command' key whose default value isn't empty. So basically, even though all the PFA entries are created for the filetypes, I have to create a dummy 'open' key with a 'command' (I duplicate the first command PFA writes) so the New menu item is created. I do this only on XP and only for extensions which have a ShellNew (New menu entry) key in the original setup. Lame.

Test Build

@Hyalian and fox_hhinve

Can you try this test build?

Hyalian, see if it fixes your shutdown issue.

fox_hhinve, see if it fixes your 64-bit minimize to tray issue. I've switched the mechanism to a COM interface.



Either of you had a chance to test this build? I'm waiting on your feedback before posting this as an official update.


Sorry, I've been with my family for easter holidays Eye-wink

I'll test it today and tomorrow considering two different setups where the results may differ.

It didn't work out yet with

It didn't work out yet with my current setup. When I open PFA and hit shutdown (either "shutdown", "restart" or the power button of the case) it seems to minimize the program, not execute the close function.

I need to do another test to be sure.. there is the possibility of Truecrypt preventing the correct function by allowing a forced dismount on shutdown which might interfere with PFA's endsession routine (because I am running PFA mainly from a TC drive). I will try again by running PFA from my local disk as a normal program (without USB drive, etc.) just to see if it is working correctly in this case.

I will do it tomorrow, then comment in the late afternoon (GMT+2 Eye-wink. Sorry to keep you waiting, but I'm behind my working schedule already and an important deadline is coming closer.

No problem. Good point about

No problem. Good point about Truecrypt. If it's being forcefully dismounted before PFA has a chance to clean up, then it will definitely have unpredictable results. Typically, I never shutdown a computer with a Truecrypt volume mounted, especially if I have programs running from it, for just that reason. Let me know how it works out under a normal shutdown.

Endsession does not work


I tested it without truecrypt running, using Windows XP and Vista64. PFA seems to minimize instead of executing the close function, thus the associations are not removed on shutdown.

Are you sure the MY_WM_ENDSESSION function will execute the onclose function?