I think I should reframe my question. But thanks for the suggestion nonetheless.

I allready know how to determine the Program Files path during runtime in c#. However, I need to get this variable outside a running c# program, in a couple of places:
1) In my .cab installer I include a setup.ddl with post-installer actions, written in native c. I use this to launch my app automatically after installing it. So I need a way of determining the localized "program files" path in native c.
2) I have a build script that refreshes the contents of the app directory of any given device using CECopy, from the command line:
cecopy <application resource files> dev:/Program Files/<my app dir>Program Files is currently hardcoded. I'd like to do something like this:
cecopy <application resource files> dev:/%PROGRAMFILES%/<my app dir>
Thoughts?