Autor Beitrag
Wolle92
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: So 23.09.07 20:28 
Hallo, ich wüsste gerne, wie ich ein anderes Programm verstecken kann...
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 23.09.07 20:38 
Vor was verschtecken? Vor dem Weihnachtsmann? :roll:

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: So 23.09.07 20:43 
^^ so dass man das fenster nicht mehr sieht...
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 23.09.07 20:49 
Such dir das Handle und schick per Suche in: Delphi-Forum, Delphi-Library SENDMESSAGE SW_HIDE

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: So 23.09.07 20:52 
Und wie krieg ich das Handle?
SAiBOT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 323
Erhaltene Danke: 6

XP SP2; 7
D7; D2009
BeitragVerfasst: So 23.09.07 20:56 
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 23.09.07 20:56 
Auch wenn ich Suche in: Delphi-Forum, Delphi-Library HANDLE nicht mit Suchtags versehen hab (jetz aber schon!), hättest du trotzdem mal danach suchen können.
Da gibts viele tolle Ergebnisse

//EDIT: zu lahm...

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 23.09.07 22:42 
user profile iconjakobwenzel hat folgendes geschrieben:
Such dir das Handle und schick per Suche in: Delphi-Forum, Delphi-Library SENDMESSAGE SW_HIDE

Besser: Suche im MSDN SHOWWINDOW
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Mo 24.09.07 08:29 
Kann ich etwas ähnliches wie FindWindow auch mit dem Prozess-Namen machen?
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 24.09.07 09:20 
Was willst du denn für ein Programm verstecken und warum? Mit dem Dateinamen geht das auch, wird bloß erheblich schwieriger, da ein Prozess ja mehrere Fenster haben kann. Guck m al im Forum nach Suche in: Delphi-Forum, Delphi-Library GETWINDOWTHREADPROCESSID. Die Idee ist alle Fenster zu enumerieren und gucken, ob ein Fenster zu dem gesuchten Prozess gehört.
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Mo 24.09.07 09:29 
Ne, ich möchte Programme, die in der Eingabeaufforderung laufen, verstecken...
Also hat da ein Prozess nur ein Fenster...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 24.09.07 10:18 
Du willst ein Konsolenfenster verstecken? Das wird ungleich schwieriger, da dies keine "normalen" Fenster sind.
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Mo 24.09.07 11:56 
Oh... ja, aber es sollte weg...
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Fr 28.09.07 09:48 
Darf ich jetzt auch mal erfahren, wie man das versteckt?
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Mi 03.10.07 20:02 
Ist das so schwer? Ich find bei Google nichts...
Aber mein Projekt hängt (OK, währenddessen laufen ältere Projekte weiter, aber egal)...
hathor
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 04.10.07 11:54 
Vielleicht solltest Du mal lernen, wie man Fragen RICHTIG stellt, dann bekommst Du auch gleich eine brauchbare Antwort!
Mir ist immer noch nicht klar, ob Du das "Konsolenfenster" öffnest...


ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
Function ShellExecuteErrMessage(int_Code: INTEGER): STRING;
 //Gibt die passenede Fehlermeldung zum ShellExecute Fehlercode zurück
Begin
  CASE int_code OF
     0: result := 'Zuwenig Speicher, ausführbare Datei war zerstört, Relokationswerte waren ungültig';
     2: result := 'Datei wurde nicht gefunden.';
     3: result := 'Verzeichnis wurde nicht gefunden.';
     5: result := 'Fehler beim gemeinsamen Zugriff auf eine Datei im Netz oder Fehler beim Zugriff auf eine gesperrte Datei im Netz.';
     6: result := 'Bibliothek forderte separate Datensegmente für jede Task an.';
     8: result := 'Zuwenig Speicher, um die Anwendung zu starten.';
    10: result := 'Falsche Windows-Version.';
    11: result := 'Ungültige ausführbare Datei. Entweder keine Windows-Anwendung oder Fehler in der EXE-Datei.';
    12: result := 'Anwendung für ein anderes Betriebssystem.';
    13: result := 'Anwendung für MS-DOS 4.0.';
    14: result := 'Typ der ausführbaren Datei unbekannt.';
    15: result := 'Versuch, eine Real-Mode-Anwendung (für eine frühere Windows-Version) zu laden.';
    16: result := 'Versuch, eine zweite Instanz einer ausführbaren Datei mit mehreren Datensegmenten die nicht als nur lesbar gekennzeichnet waren, zu laden.';
    19: result := 'Versuch, eine komprimierte ausführbare Datei zu laden.' + #13 + 'Die Datei muß dekomprimiert werden, bevor sie geladen werden kann.';
    20: result := 'Ungültige dynamische Linkbibliothek (DLL).' + #13 + 'Eine der DLLs, die benötigt wurde, um die Anwendung auszuführen, war beschädigt.';
  ELSE
    result := 'Ein Unbekannter Fehler ist aufgetreten. (' + IntToStr(int_code) + ')';
  END;
End;

procedure TForm1.FormCreate(Sender: TObject);
var
  Err: Integer;
begin
  Err:=  ShellExecute(0, 
               Nil,
               PChar('cmd.exe'),
               Pchar(''),
               Pchar(''),
               SW_HIDE);   // unsichtbar,     SW_NORMAL = sichtbar);
  if Err <= 32 then
    Showmessage(ShellExecuteErrMessage(Err));
end;


cmd.exe wird beim Beenden des aufrufenden Programms NICHT geschlossen, man muss selbst dafür "sorgen".
Im Windows-Task-Manager unter Anwendungen nicht sichtbar, aber unter Prozesse (cmd.exe).

INFOS:
www.winexperts.de/tw...20cmd.exe&ID=406

de.wikipedia.org/wiki/Command.com#cmd.exe

www.microsoft.com/re...us/cmd.mspx?mfr=true
Wolle92 Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1296

Windows Vista Home Premium
Delphi 7 PE, Delphi 7 Portable, bald C++ & DirectX
BeitragVerfasst: Do 04.10.07 14:04 
Genau das habe ich gesucht...
Kann ich denn eine bereits existierende cmd.exe wieder anzeigen/verstecken lassen?