getting Program Files path
-
how do I get the path to what on my system is C:\Program Files? I'm looking up the value of %PROGRAMFILES% currently but this might not be defined on every system.
TCHAR szPath[MAX_PATH + 1]; ExpandEnvironmentStrings("%PROGRAMFILES%",szPath,MAX_PATH);
any alternatives? Do I have to lookup some reg key? Thanks.Hush,hush... thought I heard you call my name now. Kula Shaker. Amit Dey Latest articles at CP -
Writing Word addins Office addin -
how do I get the path to what on my system is C:\Program Files? I'm looking up the value of %PROGRAMFILES% currently but this might not be defined on every system.
TCHAR szPath[MAX_PATH + 1]; ExpandEnvironmentStrings("%PROGRAMFILES%",szPath,MAX_PATH);
any alternatives? Do I have to lookup some reg key? Thanks.Hush,hush... thought I heard you call my name now. Kula Shaker. Amit Dey Latest articles at CP -
Writing Word addins Office addinUse
SHGetFolderPath()
to get the location of the folderCSIDL_PROGRAM_FILES
(that function is in shfolder.dll which you can redistribute, and it comes with any recent OS and IE version) --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas." -- Buffy -
how do I get the path to what on my system is C:\Program Files? I'm looking up the value of %PROGRAMFILES% currently but this might not be defined on every system.
TCHAR szPath[MAX_PATH + 1]; ExpandEnvironmentStrings("%PROGRAMFILES%",szPath,MAX_PATH);
any alternatives? Do I have to lookup some reg key? Thanks.Hush,hush... thought I heard you call my name now. Kula Shaker. Amit Dey Latest articles at CP -
Writing Word addins Office addinI use the c function _getcwd to retrieve the current working directory which is almost always the directory the program is running in unless you have your working directory set differently when doing debugs in VC++. Code4Food ---- "There is no try; only do or do not" -Yoda
-
I use the c function _getcwd to retrieve the current working directory which is almost always the directory the program is running in unless you have your working directory set differently when doing debugs in VC++. Code4Food ---- "There is no try; only do or do not" -Yoda
Code4Food wrote: "There is no try; only do or do not" -Yoda I think that is my all time favorite movie quote... John