Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use winXP.
For me, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Pro gramFilesDir contained a value of: C:\program files HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Pro gramFilesPath contained a value of: %ProgramFiles% which looks a lot like a way to refer to an environment variable. Like using Windows start button|run and typing: %temp% to get to the user's temp folder %programfiles% took me to my c:\program files folder. Peter T wrote: Hi Dave, Do you know if this would work in the 9x series? If sPath = "" Then sPath = WSHShell.RegRead _ ("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\P rogramFilesDir") End If Yes, that worked for me in W98SE when I ran your testme02 as posted earlier. sPath = WSHShell.environment("Process")("ProgramFiles") and MsgBox Environ("programfiles") both returned empty strings but without error. FWIW, I notice that besides "ProgramFilesDir" I also have "ProgramFilesPath", adjacent in the registry. Both show same path, as I would expect but wonder why the two keys. Regards, Peter T -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
XLS Files Default Program | Excel Discussion (Misc queries) | |||
Cannot open excel files unless from the program itself | Setting up and Configuration of Excel | |||
What program should i use for archived files? | Excel Discussion (Misc queries) | |||
XP Excel program changes all my files to not duplex as stored | Setting up and Configuration of Excel | |||
Program Files Folder | Excel Programming |