Autor Beitrag
alex_id
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Fr 28.02.03 22:24 
Hi Leute

also ich habe mal eine Frage ob man ein Programm was auf einem freigegeben Ordner eines PCs von einem anderen aus starten kann und dieses aber auf dem Host läuft ??? :?:
Ist dies möglich wenn ja wie ??? :?:

danke

Alex
BungeeBug
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 901



BeitragVerfasst: Fr 28.02.03 22:54 
im Prinziep ja ... dafür sind die Stichworte
Client/Server -> TClientSocket/TServerSocket
und ShellExecute() :)
damit sollte sich das ganze leicht realisieren lassen ...

MfG BungeeBug
alex_id Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Fr 28.02.03 23:04 
ok ich werd mir mal genauer das
ShellExecute() anschauen !!

Danke !!!

Alex
alex_id Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Mi 12.03.03 20:51 
Hey Leute danke erst mal für eure schnelle Hilfe,
Aber habt ihr mal ein Beispiel für ShellExecute() :?: Denn ich komme damit noch nicht ganz zurecht :oops: !!!

Danke !!!
Alex
alex_id Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Mi 12.03.03 21:04 
Hi vielleicht könnt ihr mir ja diesen Code verbessern denn es öffnet sich kein Programm !!!
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
procedure TForm1.DriveComboBox1Change(Sender: TObject);
begin
   DirectoryListBox1.Drive:=DriveComboBox1.Drive;
end;

procedure TForm1.DirectoryListBox1Change(Sender: TObject);
begin
   FileListBox1.Directory:=DirectoryListBox1.Directory;
end;

procedure TForm1.FileListBox1Change(Sender: TObject);
begin
   edit1.Text:=FileListBox1.Directory + FileListBox1.FileName; 
end;

procedure TForm1.Button1Click(Sender: TObject);
var FileName : string;
begin
   FileName := edit1.Text;
   ShellExecute(0,'open',PChar(FileName),nil,nil,SW_SHOWNORMAL);
end;

end.


danke
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Mi 12.03.03 21:04 
hier findeste Infos zu der Funktion

msdn.microsoft.com/l...ons/shellexecute.asp

Ein Beispiel haste hier:

ausblenden Quelltext
1:
2:
3:
4:
procedure TForm1.Button1Click(Sender: TObject);
begin
  ShellExecute(0,'open','C:\Test.exe','','C:\',0);
end;


Ungetestet

_________________
Viele Grüße
Jakob
alex_id Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Mi 12.03.03 21:11 
Und hier ist noch mal ein Code !!!
Und ich kann immer noch kein anderes Programm von meinem aus starten :evil:
Könnt Ihr sehen was ich verkehrt gemacht habe :?:
ausblenden 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:
procedure TForm1.DriveComboBox1Change(Sender: TObject);
begin
   DirectoryListBox1.Drive:=DriveComboBox1.Drive;
end;

procedure TForm1.DirectoryListBox1Change(Sender: TObject);
begin
   FileListBox1.Directory:=DirectoryListBox1.Directory;
end;

procedure TForm1.FileListBox1Change(Sender: TObject);
begin
   edit1.Text:=FileListBox1.Directory + FileListBox1.FileName;
end;

procedure TForm1.Button1Click(Sender: TObject);
var Drive,FileName : string;
begin
   FileName := edit1.Text;
   Drive := DriveComboBox1.Drive;
   ShellExecute(handle,'open',PChar(FileName),nil,PCHar(Drive),0);
end;

end.


danke Alex
alex_id Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Mi 12.03.03 21:58 
Hi
hab noch was dazu zu sagen !!!
Ich kann zb den Explorer öffnen wenn ich nur ein Verzeichis als FileName habe aber ich kann keine *.exe starten !!! Wenn ich versuche eine *.exe zustarten dann tut sich gar nix ... keine Fehlermeldung ... nix !!!

danke !!!

Alex
alex_id Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Do 13.03.03 00:08 
Ok Leute hab einen meiner Fehler gefunden : konnte kein Programm ausführen da ich Verzeichnisse Doppelt übergeben habe !!! Sorry

Aber wo ich mir immer noch nicht sicher bin ist :
welche Option ist wichtig damit das Programm auf dem Host läuft und nicht auf den Client !!!

Danke #

Alex
mars
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 238

Debian Woody, Win 2000, Win XP
D7 Ent, Kylix 3
BeitragVerfasst: Do 13.03.03 00:11 
Es gibt keine Option mit der du das einstellen kannst. Du musst auf dem Host-Computer ein Programm laufen lassen, welches die Befehle vom Client entgegen nimmt und darauf auf dem Host-Computer reagiert. Deshalb hat oben irgendwo jemand gepostet, du müssest auch nach CLient-/Server schauen...
alex_id Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Do 13.03.03 01:19 
Noch was genaueres zu meinem Problem :

ich möchte zB "regedit.exe" öffnen und dabei die Registry des anderen PCs öffnen !!!

Hat jemand eine Lösung dafür ?? Bis jetzt öffnet er immer die eigene Reg

Danke

Alex
alex_id Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 73



BeitragVerfasst: Do 13.03.03 01:22 
mars : sorry da hab ich wohl es mir zu einfach vorgestellt !!!

danke noch mal für den Tip !!!

Alex