How to get Program Files folder path (not Program Files (x86)) from 32bit WOW process?

前端 未结 6 2370
我寻月下人不归
我寻月下人不归 2021-02-19 05:42

I need to get the path to the native (rather than the WOW) program files directory from a 32bit WOW process.

When I pass CSIDL_PROGRAM_FILES (or CSIDL_PROGRAM_FILESX86)

6条回答
  •  北海茫月
    2021-02-19 06:09

    This is almost certainly a bad idea, according to a recent-ish post by the infamous Raymond Chen. See here for details. Bottom line, I think it can be done, but it's a lot of hard work and there's almost certainly an easier way.

    Microsoft built the WOW emulation layer to make your life easier. Don't waste all their time and effort by fighting it :-).

    Perhaps if you told us why you need the non-WOW Program Files directory, we could assist further.

提交回复
热议问题