Are there rules to Windows 7 Environment variable names?

The problem is that you're using recursive expansion, i.e., PATH references UTILS_WILDFLY which itself references UTILS_HOME.

Recursive expansion doesn't always work; presumably that means that it isn't supported, so there's no guarantee that it will ever work - which means you shouldn't use it - but in practice it does work sometimes, hence the confusion.

Specifically, on Windows 7, it works if and only if the variable in the middle of the recursive expansion (UTILS_WILDFLY) appears before the variable being expanded (PATH) in the list of variables in the registry. As it happens, the environment variables are alphabetized.

In your case,

  • UTILS_WILDFLY > PATH, so that doesn't work.

  • JBOSS_8 < PATH, so that does.

PATI won't work, but PATG will.