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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running an external program 1

Status
Not open for further replies.

intel2000

MIS
Jan 22, 2003
25
US
How can I run the command:

c:/winpoint/import.exe "C:/psfleads.txt" "F:\PNTTEMPL\DATAIMP\masterimport.imp" "F:\PROSPECT"

can I just put a ! in front of it?
c:/winpoint/import.exe "C:/psfleads.txt" "F:\PNTTEMPL\DATAIMP\masterimport.imp" "F:\PROSPECT"

Thanks,

Ross
 
First, why are you using forward slashes in the program path? Windows machines always use "\" not "/" in a path, though some commands are "tolerant" of the wrong character.

Try the example using ShellExecute here faq184-4377

Like this:
Code:
Declare Integer ShellExecute in Shell32.dll ;
   Long nhWnd, String cAction, String cFile, ;
   String cParam, String cDirectory, Integer nShow

lcCmd = 'c:\winpoint\import.exe'
lcParam = ' "C:/psfleads.txt" "F:\PNTTEMPL\DATAIMP\masterimport.imp" "F:\PROSPECT"'

ShellExecute(0, Null, lcCmd, lcParam, Null, 0)

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top