I hope i have choosen the right forum for my Question.
I have a little application which starts another programm with a specific path (a txt-file). Yes, easy and simple, it works fine with ShellExecute, but i have a problem with some Executables(I have to test a few programs). One Executable opens correct but it don´t opens the given path. I don´t understake whats wrong, because if I drag and drop the txt-file manualy on the executable it works. So my Question is, are ShellExecute and Drag&Drop two different things to open a programm? Does anybody know a way to fix my problem ?
This is the code i use. I call StartEXE with a String like C:\\test.txt , the programmpath is fix in the code. The Programm i want to open opens but it don´t open the path. This happens only by one Programm, if i want to open another programm this code works. Any Ideas?
Without seeing the actual parameters and the code of the executing program it's impossible to guess what may be happening. It would probably be a good idea to add some debug code to the called program so you can see exactly what parameters it is trying to deal with. What is the "runas" parameter supposed to do?
Thats what i wanted to hear The "runas" is to start a exe with admin rights.
Is it right that open a Programm with ShellExecute is different to Drag&Drop way ? Because if i drag and drop a textfile on the Program i want to open it works. btw the program is a finished one done not by myself.
Is there a way to drag&drop the textfile to the program via code?
Starting a program by command line and drag&drop are different things. An application can implement any (or neither). You cannot simulate drag&drop from code if that application is not handling the drop.