Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ShellExecute

Status
Not open for further replies.

exodus300

Programmer
Mar 22, 2002
262
AU
I am having problems with ShellExecute. I have an INI file which contains the path to an executable file and command line paramaters, which is used to open the file selected in a list box. The part of the paramaters where the filename goes needs to be enclosed in quotes (to allow for filenames with spaces), this system worked on my computer but when I installed the program on a different computer I got problems with spaces in filenames.
The INI file contains two values, command and paramaters. These two strings are loaded, the %1 is replaced with the filename, and the strings are used with ShellExecute. The parmaters part is as follows (in the INI FILE):
"/Play "%1""
I have tried various combinations of quotes, for example:
/Play ""%1""
"/Play ""%1"""
But It still executes as though there are no quotes at all.
Why doesit work ok on onecomputer and not another? [pc3]
 
Did you try the C syntax instead of basic :)

"/Play \"%1\""

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top