[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

Run a program at Server through client.

Hi all,

I have an exe file (say Upload.EXE) which is developed in VB6 and stored at mapped network directory (say P:\Develop>). This program used to do some process at remote database and get some data from their and FTP to another location. My server is windows 2000 and I secheduled to run this Upload.EXE for every 2 hrs under scheduled tasks. Now i want to run this program (upload.exe) at Server by running another program at my client pc. I mean when i click some button at client PC, that Upload.exe should run at server. (not at client pc). Is there anyway to achive this? Please advice me with some good examples. My advance thanks for your kind advices.

Sarvan
0
sarvan
Asked:
sarvan
1 Solution
 
sdm395Commented:
You could turn Upload.exe into an ActiveX exe, and then call this from your client program using createobject(classname, server), and specify the servername to create it on.  You will also have to go into dcomcnfg on the server and adjust the properties for the program, ensuring that it is set to run application on this computer
0
 
nutwissCommented:
look at the 'AT' command in Win2000 help - its a command-line command which enables you to simply specify which machine you want to run an application on:

The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.

AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"

\\computername     Specifies a remote computer. Commands are scheduled on the
                   local computer if this parameter is omitted.
id                 Is an identification number assigned to a scheduled
                   command.
/delete            Cancels a scheduled command. If id is omitted, all the
                   scheduled commands on the computer are canceled.
/yes               Used with cancel all jobs command when no further
                   confirmation is desired.
time               Specifies the time when command is to run.
/interactive       Allows the job to interact with the desktop of the user
                   who is logged on at the time the job runs.
/every:date[,...]  Runs the command on each specified day(s) of the week or
                   month. If date is omitted, the current day of the month
                   is assumed.
/next:date[,...]   Runs the specified command on the next occurrence of the
                   day (for example, next Thursday).  If date is omitted, the
                   current day of the month is assumed.
"command"          Is the Windows NT command, or batch program to be run.
0
 
anand_mCommented:
You can create a Scheduler component ( wrapper over existing WinNT Scheduler ) using ITaskScheduler,etc. and call this from the client.
The Scheduler will in turn call your VB component on the server thereby you can submit different tasks to run at different times from the client machine.

Take a look at ITask,ITaskScheduler interface to write a simple component which will invoke other Server-side components.

On the client side you can have an interface to specify the date and time during which the process should run

Anand
0
 
DanRollinsCommented:
Hi sarvan,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: sdm395@devx and nutwiss

sarvan, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now