Autor Beitrag
Chrischuh
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 124
Erhaltene Danke: 1

Win 7
Turbo Delphi
BeitragVerfasst: So 24.02.08 21:55 
Hallo,

ich benutze

ShellExecute(Handle,nil,'C:\Windows\system32\cmd.exe',"Befehl",nil,1);

um einen Cmd-Befehl auszuführen.

Aber das Fenster soll sich nicht sofort wieder schließen.

Wie bekomme ich das hin?


Chrischuh

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 24.02.08 22:19 

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Chrischuh Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 124
Erhaltene Danke: 1

Win 7
Turbo Delphi
BeitragVerfasst: So 24.02.08 22:29 
Ich weiß nicht welchen Befehl von denen ich benutzen soll.
Kann mir jemand helfen?
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 25.02.08 00:36 
Moin!

user profile iconChrischuh hat folgendes geschrieben:
Aber das Fenster soll sich nicht sofort wieder schließen.
Wie bekomme ich das hin?
Gar nicht. Es gibt zwei Alternativen:

a) ShellExecute(0,NIL,'cmd.exe','/c dir & pause',NIL,SW_SHOWNORMAL);


oder

b) Kuckst du hier.

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Chrischuh Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 124
Erhaltene Danke: 1

Win 7
Turbo Delphi
BeitragVerfasst: Mo 25.02.08 14:26 
Danke, klappt.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 25.02.08 14:49 
Moin!

Markierst du den Thread noch entsprechend, wenn dein Problem gelöst ist? Danke. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Shorty
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 107

Win XP, Ubuntu 8.04
Delphi 7 Prof., Delphi 2005 Pers.
BeitragVerfasst: Di 26.02.08 17:28 
Oder, um noch eine andere Alternative zu haben:
ausblenden Delphi-Quelltext
1:
ShellExecute(0, nil, 'cmd.exe', '/K dir', nil, SW_SHOWNORMAL);					

In dieser Variante kann man danach noch weiter in die Eingabeaufforderung eingeben.

MfG Shorty