Autor Beitrag
Mindforce
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 358

Win XP Pro / MCE, Win 98, Slax (Linux)
Delphi 07 PRO, Delphi 3+7 (mit Prdx)
BeitragVerfasst: Mo 24.09.07 17:49 
Hallöchen,

ich glaube bestimmt das jemand diese Freage irgendwannmal geschrieben hat.
Aber ich finde sie in der Suche nicht.

So nu meine Frageeee:

Wie kann ich mein Programm mit Parametern starten? Also Beispielsweise so: "programm.exe /quiet /norestart". So als Beispiel.

dfANKE für eure Hilfe!!!

Mf

_________________
Our force; in mind.
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mo 24.09.07 17:53 
Hallo,

das sind 2 Befehle für dich wichtig. Diese heißen paramcount und paramstr. Wenn du nach diesen suchst oder einfach in die Delphi Hilfe schaust solltest du auf die Lösung kommen.

Gruß
Klabautermann
Mindforce Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 358

Win XP Pro / MCE, Win 98, Slax (Linux)
Delphi 07 PRO, Delphi 3+7 (mit Prdx)
BeitragVerfasst: Mo 24.09.07 18:30 
So. Hab gottseidank etwas gefunden und es funktioniert auch.
Hier hab ich mal den Code kopiert:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
program Project1;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}
{$APPTYPE CONSOLE}

begin
if ParamStr(1) = '/CONSOLE' then
begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end;
end.


Mf

Moderiert von user profile iconNarses: Quote- durch Delphi-Tags ersetzt

_________________
Our force; in mind.