VB
(1)
PSTools
(1)
PSExec
(1)
GUIs
(1)
Helptommy
(1)
Windows
(1)
Sysinternals
(1)
Openoffice
(1)

Run programs on net PCs using the command line

Asked By tommy
18-Nov-09 07:19 PM
Hi everybody,
I have a small network, say
PC 1 :  10.148.69.106
PC 2 :  10.148.69.107  etc..

I want to know if it is possible to run a program on a network pc
( PC2) using CMD on PC1.
In particular I would be able to be at PC1 keyboard and tell to the
PC2 via the command line to run a program and print a pdf, doc,
openoffice or other documents. PC1 cannot print anything , it does not
have a working net printer driver (do not know why - tried to uninstall
and reinstall the net printer driver several times with no luck).

For instance something like
net use \\10.148.69.107\Program_files\Acrobat\Acrord32.exe /t K:
\myfile.pdf
but I know this is not the right way. The program Acrord32.exe has to
run on PC2 not PC1 in order to work.

I tried the PRINT command on PC1 but it does not work on PDF, only text
files (perhaps the Print utility does not use the non-working drivers,
it talks directly to the printer???)

I do not want to use remote desktop or VNC because other office workers
on PC2 do not want to see what I am doing - lose control over the mouse
etc.

Thanks.

See "rexec" in Windows Helptommy wrote:

Bob I replied to tommy
18-Nov-09 01:06 PM
See "rexec" in Windows Help

Bob I wrote:rexec does not work in Windows 2000, the daemon is not installed.

Alister replied to Bob I
18-Nov-09 01:28 PM
rexec does not work in Windows 2000, the daemon is not installed.

Have a look at PSTools instead, in particular PSExec.

http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

Alister

The OP should be aware that psexec.

Pegasus [MVP] replied to Alister
18-Nov-09 02:39 PM
The OP should be aware that psexec.exe is restricted to running console
commands. In other words, no GUIs!
Pegasus [MVP] wrote:Just to be awkward, that is not strictly true.
Alister replied to Pegasus [MVP]
18-Nov-09 08:41 PM
Just to be awkward, that is not strictly true.

From a local machine I can invoke an instance of any executable that I
want from the command line, remotely, including GUI programs - I just
will not be able to see the GUI.

You do this by running a remote copy of cmd.exe and then once in that
you can run what you want. It is perfectly possible to run an instance
of explorer using PSExec, but it will run on the remote machine.

Much fun can be had calling a VB script that pops up a carefully worded
message box on the remote desktop, to the consternation of the user!
You can even schedule it to happen at a set time, using the "at"
command, so you can be standing next to the user when it goes off!

Not that I would do that to my users, of course.

However, I believe the OP was in fact asking about command line access.

Alister.
Post Question To EggHeadCafe