Solved

Run a program at Server through client.

Posted on 2001-08-17
4
192 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now