|
LITTLEBLACKDOG.COM
|
| Author |
Message |
Alphi
Tail-Wagger


Joined: 05 Apr 2002 Age: 36 Posts: 2987
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: 16270
Location: In a Godda da Vita, Honey
|
Posted:
Mon Apr 21, 2008 6:03 am Post subject: |
|
http://filext.com/ |
_________________ The ONE thing EVERYONE has in Common is that they think they are Above Average Drivers.
|
|
|
|
|
T
Curmudgeon

Joined: 17 May 2001 Posts: 15914
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, 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.
Elf booty got soul. Elf girls like to rock and roll.
|
|
|
|
|
CMTG
Leg Humper


Joined: 23 Feb 2002 Posts: 4822
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.
So I'm cruising in my '91 Daihatsu blasting Vanessa Carlton's rockin' smash hit "A Thousand Miles," when it suddenly occurs to me:
"Am I too gangsta? Am I too hardcore and menacing for this world?" I just might be.
- Tatsuya Ishida
|
|
|
|
|
Alphi
Tail-Wagger


Joined: 05 Apr 2002 Age: 36 Posts: 2987
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!
|
|