Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch file to log on.

Status
Not open for further replies.

Napoleon99

Programmer
Sep 20, 2002
11
US
Hi

I need to run a VB program on a remote server that I connect to thru terminal services. The program has to run on the machine all day. In order to keep it running I
have to be logged on to the server thru the terminal services all the time, which is not acceptable. As soon as I log off the server the program stops running. I tried to schedule the task and then log off, that didn't help. I came to the conclusion that a remote server has to be logged on by a user. Then I thought maybe a batch file can be run from the task scheduler which can log on the server and then another task can run my program. The problem is I don't know how to make that batch file. Does anybody know how to do it? Do you have any other suggestions how to solve the problem?

Your assistance is greatly appreciated.
 
One way....
Try using DCOM. After installing the activeX app on the server you can create a "control panel" on your computer that will start and stop processes.

Just a thought.... Scott
Programmer Analyst
<><
 
If you want a process to run on a server automatically when no one is logged in then you should create a service and install it. Thus it will start back up if the server crashes.
 
For such things I set up an app with winsock which is in the servers registry run. I can connect to it and say which app is to be started. I built a security routine into it and it works better then all of the other back and forth that MS makes available. If you need a copy I'm watching this thread.
 
Merlinx-

Thank you for your assistance. Actually I found way of
doing it, but if you could post that copy I would greatly appreciate it! It is always good to know more that one
way of doing things. Here is my solution. I connect
to the remote server thru the terminal services and run
the application. If I disconnect from remote server without
logging off the application will be still running.
Next time I connect to the server I see my application running. I don't think it is the best solution but it works.
I will be waiting for your reply

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top