Solved

Run a program at Server through client.

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 Compile Compatibility Issue 4 87
Best way to parse out a json string in VB6? 10 109
VBA filters 2 50
Error when passing an argument to a vb6 that contains  '/' 7 30
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

932 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

11 Experts available now in Live!

Get 1:1 Help Now