
Signature
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
Generally, you'd use SHGetSpecialFolderPath(). I'm not aware of a
generally-available (all versions of Windows Mobile), method of getting that
without P/Invoking it.
BOOL SHGetSpecialFolderPath(
HWND hwndOwner,
LPTSTR lpszPath,
int nFolder,
BOOL fCreate
);
SHGetSpecialFolderPath( hwnd, pathstring, CSIDL_PROGRAM_FILES /* 0x26 */,
FALSE ) would get the path that you're interested in.
Paul T.
> Hi,
>
[quoted text clipped - 18 lines]
>> where the startup links is present, not the real path where the exe is
>> present.
Bjørn Brox - 07 Jan 2008 19:56 GMT
Paul G. Tobey [eMVP] skrev:
> Generally, you'd use SHGetSpecialFolderPath(). I'm not aware of a
> generally-available (all versions of Windows Mobile), method of getting that
[quoted text clipped - 9 lines]
> SHGetSpecialFolderPath( hwnd, pathstring, CSIDL_PROGRAM_FILES /* 0x26 */,
> FALSE ) would get the path that you're interested in.
Thanks, it worked.
The returned value from this was as expected: "\\Program Files"
Any reason that the
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
wrapper returns "\\Windows\\Start Menu\\Programs"?
...

Signature
Bjørn Brox
Paul G. Tobey [eMVP] - 07 Jan 2008 20:55 GMT
I'm sure there must be, but I certainly don't know what it is! What version
of .NET CF does it do that in? Maybe it was fixed in a later version or
service pack.
Paul T.
> Paul G. Tobey [eMVP] skrev:
>> Generally, you'd use SHGetSpecialFolderPath(). I'm not aware of a
[quoted text clipped - 19 lines]
>
> ...
Bjørn Brox - 07 Jan 2008 21:20 GMT
Paul G. Tobey [eMVP] skrev:
> I'm sure there must be, but I certainly don't know what it is! What version
> of .NET CF does it do that in? Maybe it was fixed in a later version or
> service pack.
I am using CF 3.5
Anyhow, both "\\Program Files" and "\\Windows\\Start Menu\\Programs" are
in my opinion both special folders that should be covered by the
Environment.SpecialFolder enum.
>> Paul G. Tobey [eMVP] skrev:
>>> Generally, you'd use SHGetSpecialFolderPath(). I'm not aware of a
[quoted text clipped - 18 lines]
>>
>> ...

Signature
Bjørn Brox