Autor Beitrag
*Knust*
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 11:38 
Hi!
Ich würde gerne mal wissen, welche möglichkeiten es gibt, ein anderes programm zu öffnen.
Ich habe nämlich folgendes problem: Ich möchte automatisch ein Video-bearbeitungsprogramm starten lassen, aber anscheinend kann man das nur manuell starten.
Ich habe es mittlerweile mit shellexecute, winexec und einer batchdatei versucht, alles funktioniert nicht, ich bekomme den windowsfehler: das programm konnte nicht richtig installiert werden, neuinstallation könnte das problem beheben...
aber wenn ich es per mausklick starte, geht es reibungslos...

Gibt es noch andere Wege ein Programm zu starten?

Ich nehme an, dass die hersteller des programms nicht wollten, dass man ihr programm wieder in ein anderes einbauen kann und es als seins veröffentlichen kann, aber das will ich auch nicht, ich will mein programm nur auf meinem pc benutzen...

Hat jemand ne ahnung?

mit freundlichen Grüßen

Knust
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Fr 18.07.08 11:42 
wenn du das Programm über eine Verknüpfung startest, schaue dir doch mal an ob Parameter mit übergeben werden. vielleicht ist das das Problem.
Alternativ gäbe es noch CreateProcess.
*Knust* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 11:45 
Wo sieht man an ner Verknüpfung ob Parameter übergeben werden?

Danke schonmal ;)
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Fr 18.07.08 11:52 
Rechtsklick auf die Verknüpfung dann Registerkarte Verknüpfung und dann bei "Ziel".
*Knust* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 11:55 
Nö, es wird nix übergeben und createprocess geht auch nich... genau die gleiche meldung...
:(
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Fr 18.07.08 11:57 
liegt es vielleicht an deinem projekt? hast du mal ein leeres gemacht mit nur dieser Zeile?
*Knust* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 11:59 
Ja gerade eben zum ausprobieren...
Die zeilen stehen drin:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var
  Form1: TForm1;
  StartupInfo : TStartupInfo;
  ProcessInfo : TProcessInformation;

procedure TForm1.FormCreate(Sender: TObject);
begin
StartupInfo.dwFlags := STARTF_USESHOWWINDOW OR STARTF_USEPOSITION OR STARTF_USESIZE ;
StartupInfo.wShowWindow := SW_SHOWDEFAULT;
CreateProcess (nil,pChar('C:\Programme\AutoGK\AutoGK.exe'),nil,nil,False,NORMAL_PRIORITY_CLASS,nil,nil,startupinfo,ProcessInfo);
end;


Und das steht bei shellexecute da:

ausblenden Delphi-Quelltext
1:
shellexecute(0,PChar('open'),pchar(progpfad2),nil,nil,SW_SHOW);					
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Fr 18.07.08 12:02 
Übergib mal bei ShellExecute statt das handle deiner Anwendung. Vielleicht hilft das was. Glaub ich zwar nicht aber mal sehen... Was gibt ShellExecute für einen Wert zurück?
*Knust* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 12:14 
was soll ich als handle übergeben???

Also es kommt 42 raus bei shellexecute...wenn das ma kein zeichen is ^^
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Fr 18.07.08 12:28 
einfach die Variable Handle, sofern du eine VCL-Anwedung hast.
*Knust* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 12:37 
ne geht auch nich :(
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Fr 18.07.08 12:39 
ausblenden Delphi-Quelltext
1:
shellexecute(application.handle,'open',pchar(ExtractFileName(progpfad2),nil,pchar(ExtractFilePath(progprad2),SW_SHOWNormal);					
Einloggen, um Attachments anzusehen!
_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.


Zuletzt bearbeitet von ZeitGeist87 am Fr 18.07.08 13:38, insgesamt 2-mal bearbeitet
j.klugmann
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 18.07.08 12:43 
TStartUpInfo muss innitialisiert werden glaub ich:
ausblenden Delphi-Quelltext
1:
StartupInfo.cb := Sizeof(TStartupInfo);					
:roll:
///Blöde verschreiber


Zuletzt bearbeitet von j.klugmann am Fr 18.07.08 12:44, insgesamt 1-mal bearbeitet
*Knust* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 12:43 
auch nich :(
j.klugmann
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 18.07.08 12:45 
Was war gemeint das von user profile iconZeitGeist87 oder meins?!
*Knust* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 13:01 
beides geht nich immer die gleiche meldung...
*Knust* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 13:07 
whoho!!!
DAS von zeitgeist geht doch!!!
DANKE!
iwie hab ich mich wohl beim ersten versuch verschrieben...

DANKE DANKE!

Knust
Fabian E.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 554

Windows 7 Ultimate
Visual Studio 2008 Pro, Visual Studion 2010 Ultimate
BeitragVerfasst: Fr 18.07.08 13:30 
Komisch...seid wann muss man das denn so machen? Naja egal ;) Solangs jetzt geht :)
*Knust* Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95



BeitragVerfasst: Fr 18.07.08 13:39 
Wusste ich auch nich, meine variante hat beim anderen programm auch tadellos geklappt....
j.klugmann
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 18.07.08 14:19 
hmmmm...Wieso hat meine Variante nicht geklappt?Was zeigt er für ein fehler an?