ajgonzalezm
asked on
Executing remotely from program
I have a program named READER.EXE on PC 'A'. I need to run it on PC 'A' calling it (with some parameters) from PC 'B'. How can I do this in Win 98?
I mean from a programming language, not using remote control applications or NetMeeting.
Thanks a lot in advance for any help.
AJ
I mean from a programming language, not using remote control applications or NetMeeting.
Thanks a lot in advance for any help.
AJ
I think you're asking this in the wrong topic area. You should use the link at the left under EE Info, called All Topics, and choose one of the Programming topics. You can delete this question and ask it in a more appropriate place, or else link a zero point question in the other area to this question.
Descripe the parameters you need to pas? Or are you talking about switches?
var
siStrtInfo: PStartupInfo;
piProcInfo: TProcessInformation;
siStrtInfo.cb := SizeOf(TStartupInfo);
dwFlags := STARTF_USEPOSITION or STARTF_USESIZE or STARTF_USESHOWWINDOW;
wShowWindow := SW_RESTORE;
CreateProcess('c:\WINNT\MS HEARTS.EXE /TheSwitch', nil, nil, nil, False,CREATE_DEFAULT_ERROR _MODE + NORMAL_PRIORITY_CLASS, nil, nil, siStrtInfo^, piProcInfo);
CloseHandle(piProcInfo.hPr ocess);
or
ShellExecute(Self.Handle, 'OPEN', 'c:\WINNT\MSHEARTS.EXE /TheSwitch', '', 'c:\WINNT\', SW_RESTORE);
Rplace the c:\ with the drive indicator of the PC A. You may have to us \\ as the first part of PC A's indicator
The Crazy One
var
siStrtInfo: PStartupInfo;
piProcInfo: TProcessInformation;
siStrtInfo.cb := SizeOf(TStartupInfo);
dwFlags := STARTF_USEPOSITION or STARTF_USESIZE or STARTF_USESHOWWINDOW;
wShowWindow := SW_RESTORE;
CreateProcess('c:\WINNT\MS
CloseHandle(piProcInfo.hPr
or
ShellExecute(Self.Handle, 'OPEN', 'c:\WINNT\MSHEARTS.EXE /TheSwitch', '', 'c:\WINNT\', SW_RESTORE);
Rplace the c:\ with the drive indicator of the PC A. You may have to us \\ as the first part of PC A's indicator
The Crazy One
If you were on NT, you could do a NOTIFY A from B to run a program on A, but under 9x you'll need something like PCAnywhere on both machines.
If B has X is mapped to A, then doing an X:pgm will just download pgm to B and run it on B.
CrazyOne's code shows several ways to programmatically run a program, but the execution still takes place on B.
If B has X is mapped to A, then doing an X:pgm will just download pgm to B and run it on B.
CrazyOne's code shows several ways to programmatically run a program, but the execution still takes place on B.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
These are free tools for your problem.
You may run scripts, dos, batch, windows softwares.
But only for Windows NT/2000.
Have an upgrade of Windows 98 ?
Longbow
You may run scripts, dos, batch, windows softwares.
But only for Windows NT/2000.
Have an upgrade of Windows 98 ?
Longbow
What language do you want to use?You could create a client/server app to do this using winsock.
ASKER
bartsmit,
I'll not be using bat files but the technique is an easy one and I can implement it on any languaje.
Thanks a lot!
Cheers,
AJ
I'll not be using bat files but the technique is an easy one and I can implement it on any languaje.
Thanks a lot!
Cheers,
AJ