Solved

Run a program at Server through client.

Posted on 2001-08-17
4
195 Views
Last Modified: 2008-02-01
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
Comment
Question by:sarvan
4 Comments
 
LVL 1

Expert Comment

by:sdm395
ID: 6395977
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
 
LVL 4

Accepted Solution

by:
nutwiss earned 200 total points
ID: 6396639
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
 

Expert Comment

by:anand_m
ID: 6396669
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 7202342
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question