Solved

open a program with associated file programmatically

Posted on 2006-11-28
3
757 Views
Last Modified: 2013-11-20
Hi Experts,

When in windows exlorer, double clicking on any file opens up the associated program by its extension.  Is there a windows API call that I can use that just takes a full path to a file to open up the correct program for me with the file?

Thanks!
Mike
0
Comment
Question by:thready
  • 2
3 Comments
 
LVL 5

Expert Comment

by:Alkali_Guy
ID: 18032273
ShellExecute
0
 
LVL 5

Accepted Solution

by:
Alkali_Guy earned 500 total points
ID: 18032303
You can do:

ShellExecute(NULL, "open", "Foofile.txt", NULL, NULL, SW_SHOW);
0
 
LVL 1

Author Comment

by:thready
ID: 18032340
Thank you very kindly!  :-)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Rewrite URL With Encoded Characters 6 78
zeroMAx challenge 20 101
Trying to run powershell  in a batch file. How do I do this? 8 92
Is there a simple front-end menu system. 9 89
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question