I meant that even IF it is installed (DX9), you won't be able to run DirectX9 native programs.
Sure you would, that's my point.
Half-Life 2 and Far Cry are DirectX9 'native' programs (I hate that 'native' term, gets used for all kinds of nonsense these days).
That is, the only API they support is DirectX9. In other words, they are linked to d3d9.dll, and no other DLL of any other D3D version whatsoever, so they do not access any code other than that belonging to DirectX9.
It's true that DirectX 9 games can support SM1.1, but it's in dev's hands to make a proper support and optimisations for it. DirectX 9 does not guarantee DirectX 8.X hardware support.
I didn't say anything even remotely like that.
Fact of the matter is, when DX9 came out, most people still had DX7/DX8-era hardware, and as such, a lot of games have supported such hardware in the early DX9-days (remember, DX9 is REALLY old, been around since 2002. It wasn't until around 2006-2007 that SM2.0+ hardware was commonplace).
A special DX7 codepath is needed for game engine to use when such cards are detected.
That is not correct.
A codepath that supports the features of DX7-level hardware is needed (and technically there is no such thing, back in those days, features were all over the place, so you didn't go by DX version number, but rather by whatever the caps bits told you the hardware did or did not support). That code is still DX9 though (see above, d3d9.dll only).
There are no "Feature Level" or "Shader Model" or "caps" for DirectX 7 hardware in DX9, because DX7 cards cannot support any Shader Model.
DX9 works with shader models and caps (pretty much the same thing as the feature level stuff we've had since DX11, just a bit more detailed, since as I said, the hardware was all over the place back then).
Here's what that looks like, in DXCapsViewer:
So DX7 hardware will just report no VS and no PS capabilities, but they will have various TextureOpCaps and other stuff, which allow you to shade pixels in various ways via the fixed function pipeline that is present in DX9 (which is far more capable than the one in DX7. Even most DX7-era hardware has far more capabilities than what DX7 exposes, so using DX9 on DX7-era hardware is the preferred way to go).
Also, you can still use the software vertex shader pipeline on DX7-level hardware.
In fact, some hardware (eg Intel IGPs) have pixel shaders, but no T&L or vertexshaders, so you run vertexshaders on the CPU to get full DX9 SM2.0+ functionality (cute that people talk about 'shader model' but technically, there's no rule that VS and PS have to be the same version, and on various hardware, they aren't).
So yes, technically, if you enable software vertexprocessing in DX9, you can run shaders on DX7 hardware. I have done this for some GeForce2-code in the past.
This concludes today's lesson of Direct3D programming 101.