|
LITTLEBLACKDOG.COM
|
| Author |
Message |
Alphi
Big Dog


Joined: 05 Apr 2002 Age: 36 Posts: 3021
Location: Grand Rapids, MI USA
|
Posted:
Mon Apr 21, 2008 5:57 am Post subject: Determine file-type and application association - Windows XP |
|
Hey guys,
I need to find a way to, based on a file's extension, determine what application to open up.
I know all that data is there in Windows somewhere (probably in the Registry somewhere), since I know if I double-click on a XLS file, it magically knows to open MS Excel.
But my program needs to do that - where can I find that data, so that, for example, if I look for the file type DOC, I find: "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" or at least something similar that I can work with? |
_________________ They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.
- Benjamin Franklin
Prosper.com - P2P lending
|
|
|
|
|
ThunderDawg
Alpha Dog


Joined: 14 Apr 2002 Posts: 16409
Location: In a Godda da Vita, Honey
|
Posted:
Mon Apr 21, 2008 6:03 am Post subject: |
|
|
|
|
|
T
Curmudgeon

Joined: 17 May 2001 Posts: 16060
Location: Airstrip One
|
Posted:
Mon Apr 21, 2008 6:08 am Post subject: |
|
HKEY_CLASSES_ROOT
HKEY_LOCAL_MACHINE\SOFTWARE\Classes (HKEY_CLASSES_ROOT is a copy of this one) |
_________________ Got questions? Click here.
Still got questions? Click here, too.
affabletoaster, Akely, anglachel, blahpony, CMTG, EdisonRex, Elk, Equin, evilness, Fido, fathertyme, Goddess, Jaymac, je, jodygirl, KingKobra, Lycander, mally, Max, OhioArt2, perrito_blanco, Rover, Spot, sully_51, Superdwarf, the taz man, thriftyjack, twiztid, wrathiron, yiayia49
A journey of 3,500 miles begins with a single comic.
Would you like good music at a price that is right? CD Baby, baby.
The best way to blow off steam is to blow off someone's nadgers.
|
|
|
|
|
CMTG
Leg Humper


Joined: 23 Feb 2002 Posts: 4864
Location: On average, Cheltenham.
|
Posted:
Mon Apr 21, 2008 6:13 am Post subject: |
|
MSDN is your friend:
http://support.microsoft.com/kb/170918
http://msdn2.microsoft.com/en-us/library/bb762153.aspx
Quote:You can use the Windows API ShellExecute() function to start the application associated with a given document extension without knowing the name of the associated application. |
_________________ Pie. I wish I could
constrain my hungry greed but...
Sadly, defeated.
"Have I seen you at the gym? I don't go to the gym, I'm just naturally like this..."
- Captain Hammer
|
|
|
|
|
Alphi
Big Dog


Joined: 05 Apr 2002 Age: 36 Posts: 3021
Location: Grand Rapids, MI USA
|
Posted:
Mon Apr 21, 2008 7:23 am Post subject: |
|
That works... Thanks guys! |
_________________ They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.
- Benjamin Franklin
Prosper.com - P2P lending
|
|
|
|
|
|
|
|
|
View next topic
View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB
© 2001, 2002 phpBB Group
phpBB SEO
All times are GMT - 8 Hours
Help us keep advertisements off this site. Donate today!
|
|