# batch that starts program on workgroup pc



## deaner00 (Oct 23, 2008)

Hello,

I need to start a program on a workgroup computer.

I've tried this:

\\remotehost\<directory of program>\executable

but it says access is denied. I've also tried.

start "" "G:\batchfile.bat" (this batch file contains "start" code for the aforementioned program)

Where G is the mapped drive of the remote pc. It also responds with access is denied. The computers are setup on a workgroup with the same username logged in to both. It may just be a user permission problem. How would I fix that? Any help would be greatly appreciated.


----------



## leroys1000 (Aug 16, 2007)

You may need to add the user from the computer to the computer
hosting the program.
Then.
Right click the actual program,select sharing and security.
If you want to limit access to that user on the remote computer,
You will need to add the user to the security list and set permissions.

If you want open access on the network,select the sharing tab instead.
Then check the box to share the file,click apply/OK.


----------



## deaner00 (Oct 23, 2008)

The user is the same on both pc's.

When I right click the program it does not give me the sharing and security option to select. It does when I click on the folder containing the program, but I have already shared that folder.

It is not a domain but a workgroup. Does that make a difference?

Thank you for your help. All I need to do is start a program on another computer in my workgroup (remotely). It doesn't have to be a batch file, I just thought that would be easisiest.


----------



## leroys1000 (Aug 16, 2007)

You might check the user account on the remote PC to see if it
has access to run programs remotely.


----------



## TheOutcaste (Aug 8, 2007)

Welcome to TSG!

If you want to start a program on a remote PC you need to either telnet to that system, use remote desktop to connect to that system, or use a version of VNC to connect to that system.

Otherwise the program will try to run on your PC, not the remote one.

You can use a tool like Sysinternals PsExec (part of PsTools) to run a program on the remote system, but it will not interact with the user of that system, so you can't start Notepad and have it pop up on their screen for example. It's designed more for administration, like running ipconfig on a remote system and seeing the results on yours.

You can create a scheduled task to run a program. Navigate to the Scheduled Tasks folder on the remote PC, right click and point to New, then click Scheduled Task. You can create a task that will run once and set the time to one minute from now -- note that "now" is based on the time on the remote PC, not yours, so you might want to use Net Time to check the time first.

Be sure to set the task to delete itself from the settings tab if you only want it to run once.

HTH

Jerry


----------

