I believe the location of the Program Files directory is stored in the registry key "SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir".
Does this method fail sometimes? Perhaps in a hacked 98 installation? If so, are there alternative means of figuring this out?
Thanks!
Page 1 of 1
Locating the Program Files directory
#2
Posted 06 June 2006 - 05:22 PM
CSIDL :
http://msdn.microsoft.com/library/default....enums/csidl.asp
http://vbnet.mvps.org/index.html?code/brow...idlversions.htm
That's what I have used for my Shell Folder Launchers :
http://homepage.ntlw...nk/Files/SFL.7z
http://msdn.microsoft.com/library/default....enums/csidl.asp
http://vbnet.mvps.org/index.html?code/brow...idlversions.htm
That's what I have used for my Shell Folder Launchers :
http://homepage.ntlw...nk/Files/SFL.7z
#3
Posted 07 June 2006 - 01:23 AM
Because I didn't know this registry entry, I used in my Installed Files Checker (click my signature) I used this workaround:
If not found then go to next
1/ checking for Program Files folder
2/ checking for Programs folder
3/ checking for a folder cntaining subfolders usualy stored in the Program Files folder such as Microsoft Office, Internet Explorer
4/ finaly asking the user where this f***ing folder is.
HTH
If not found then go to next
1/ checking for Program Files folder
2/ checking for Programs folder
3/ checking for a folder cntaining subfolders usualy stored in the Program Files folder such as Microsoft Office, Internet Explorer
4/ finaly asking the user where this f***ing folder is.
HTH
#4
Posted 07 June 2006 - 11:55 AM
> CSIDL
IIRC, SHGetSpecialFolderPath fails on 98 when trying to find Program Files.
That's why I was using the registry key.
Actually your second link confirms this, CSIDL_PROGRAM_FILES requires version 5.0 Shell32.dll, which IE 5.0 won't update on a Win 98 system.
IIRC, SHGetSpecialFolderPath fails on 98 when trying to find Program Files.
That's why I was using the registry key.
Actually your second link confirms this, CSIDL_PROGRAM_FILES requires version 5.0 Shell32.dll, which IE 5.0 won't update on a Win 98 system.
This post has been edited by azagahl: 07 June 2006 - 11:57 AM
#5
Posted 08 June 2006 - 02:56 PM
It's shfolder.dll that can do it on older sytems. Anyway they will both look in the registry as there is no other place where the special shell folders paths are stored AFAIK.
http://msdn.microsoft.com/library/default....tfolderpath.asp
So this does this work on Win98 ? :
http://www.stashbox.org/uploads/1149799907...ram%20Files.exe
Does running this exe, opens the program file folder on your 98 system or not ?
I have just tested it on ME on which I have shell32.dll 5.50.4134.100.
http://msdn.microsoft.com/library/default....tfolderpath.asp
So this does this work on Win98 ? :
http://www.stashbox.org/uploads/1149799907...ram%20Files.exe
Does running this exe, opens the program file folder on your 98 system or not ?
I have just tested it on ME on which I have shell32.dll 5.50.4134.100.
Share this topic:
Page 1 of 1



Help

Back to top









