External program launch issue
-
Hi, I tried several things to launch an external program :
CString command("\"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that closes instantly and doesn't launch PSPad.CString command("cmd /C \"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that launches PSPad but the calling dialog looses focus until I close PSPad. Actually I'd like to launch my program just like double clicking on "log.txt" would do (without a command prompt would be great). Is it possible ? Thanks ! -
Hi, I tried several things to launch an external program :
CString command("\"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that closes instantly and doesn't launch PSPad.CString command("cmd /C \"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that launches PSPad but the calling dialog looses focus until I close PSPad. Actually I'd like to launch my program just like double clicking on "log.txt" would do (without a command prompt would be great). Is it possible ? Thanks !Tnarol wrote:
I'd like to launch my program just like double clicking on "log.txt" would do (without a command prompt would be great). Is it possible ?
Use
ShellExecute(...)
orCreateProcess(...)
API's for launching external application's Knock out 't' from can't, You can if you think you can :cool: -
Hi, I tried several things to launch an external program :
CString command("\"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that closes instantly and doesn't launch PSPad.CString command("cmd /C \"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that launches PSPad but the calling dialog looses focus until I close PSPad. Actually I'd like to launch my program just like double clicking on "log.txt" would do (without a command prompt would be great). Is it possible ? Thanks ! -
Hi, I tried several things to launch an external program :
CString command("\"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that closes instantly and doesn't launch PSPad.CString command("cmd /C \"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that launches PSPad but the calling dialog looses focus until I close PSPad. Actually I'd like to launch my program just like double clicking on "log.txt" would do (without a command prompt would be great). Is it possible ? Thanks !::ShellExecute(NULL, "open", "D:\\USER\\PSPad editor\\PSPad.exe", "log.txt", NULL, SW_SHOW);
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
::ShellExecute(NULL, "open", "D:\\USER\\PSPad editor\\PSPad.exe", "log.txt", NULL, SW_SHOW);
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
::ShellExecute(NULL, "open", "D:\\USER\\PSPad editor\\PSPad.exe", "log.txt", NULL, SW_SHOW);
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
And you suggested this the other day!!! Your previous post[^] Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
-
And you suggested this the other day!!! Your previous post[^] Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
broken link... use the little [getLink] button at the bottom of a thread when using posts liks...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
broken link... use the little [getLink] button at the bottom of a thread when using posts liks...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
http://www.codeproject.com/script/comments/forums.asp?msg=1529273&forumid=1647#xx1529273xx[^] Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
-
And you suggested this the other day!!! Your previous post[^] Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_
_AnShUmAn_ wrote:
And you suggested this the other day!!!
COOL !!! :) Knock out 't' from can't, You can if you think you can :cool:
-
Hi, I tried several things to launch an external program :
CString command("\"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that closes instantly and doesn't launch PSPad.CString command("cmd /C \"D:\\USER\\PSPad editor\\PSPad.exe\" \"log.txt\""); system(command);
The above code launches a command prompt that launches PSPad but the calling dialog looses focus until I close PSPad. Actually I'd like to launch my program just like double clicking on "log.txt" would do (without a command prompt would be great). Is it possible ? Thanks !