Needing a colon : for include statements

I can't figure out the story of needing a colon for my includes:

#include "myProcedures" // option 1


works some of the time, whereas

#include ":myProcedures" // option 2


is sometimes needed.

In more detail, I always use a custom User Procedures (Misc -> Miscellaneous Settings -> Igor User Files -> Change Path...). Sometimes, I accidentally overwrite the custom folder by opening multiple Igor instances (CTRL+click) too quickly, or sometimes I perform a fresh install of Igor or send code to colleagues. In these cases, either option 1 or 2 above seems to be needed.

I can't figure out what's going on here and there's no mention of the colon in the manual. How can I make Igor behave consistently? It's fairly annoying to change this for all of my experiments and/or figure out the issue every time I share code with non-coders.
The meaning of a leading colon is explained in the help and manual. Execute:
DisplayHelpTopic "The Include Statement"


Compare items 2 and 4 in the numbered list in that help topic.
I solved this confusion. The answer is best described by giving the possible scenarios (Igor 6.3):

1. If the IPF or a shortcut to it is placed in Program Files (%PROGRAMFILES(X86)%\WaveMetrics\Igor Pro Folder\User Procedures), then Igor requires Option 1.

2. If the custom User Procedures is changed as described above, or if a shortcut to another folder is placed there, then Igor requires Option 2.

3. If you do both of the above, then Igor follows #1 first.

Conclusion: it is better to never use #1, because it makes admin rights a prerequisite to the sharing of an Igor PXP.
Wait ... What??? It is better to NEVER use the recommended method to install and manage Packages?

That is a rather broad and thereby disconcerting statement. Perhaps I misunderstand. I've bounced around with my own set of Packages and Procedures files, always using the recommended method, with no serious problems.

Politely said, you probably mean this ...

When you distribute a Package that includes an Experiment (.pxp) and associated Procedures (.ipf) files, AND when you distribute them as one self-contained folder, AND when you wish to allow your users (including yourself) to put the entire Package folder of .pxp and .ipf files wherever they want on their hard drive, you must use the #include ":Folder Name" convention.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
Quote:
1. If the IPF or a shortcut to it is placed in Program Files (%PROGRAMFILES(X86)%\WaveMetrics\Igor Pro Folder\User Procedures), then Igor requires Option 1.


"Option" I think refers to the four cases listed under:
DisplayHelpTopic "The Include Statement"

First, you should not use "Program Files" since that is a protected folder. Use the "User Procedures" folder in "Igor Pro User Files". For details, execute:
DisplayHelpTopic "Special Folders"

The one exception to this is if you have multiple users using the same Igor installation from different user accounts. If you want to make a procedure file available for all users, you must use the "User Procedures" folder in "Program Files".

Next, case 1 refers to WaveMetrics procedures, not user procedures.

User procedures are described under case 2 (file name) and case 4 (partial path starting with colon).

Quote:
3. If you do both of the above, then Igor follows #1 first.


"Both" refers to putting a file in "Program Files...\User Procedures" and in "Igor Pro User Files...\User Procedures". As the help explains, if you use a leading colon (case 4), Igor first looks in "Program Files...\User Procedures" and if that fails it looks in "Igor Pro User Files...\User Procedures". It would be better if the order was reversed but I did it that way when "Igor Pro User Files" (6.20) for backward compatibility.