Reputation: 10012
I've been asked to look at a Windows Server 2003 (I know...0
I don't have any experience managing such machines.
Basically, I have some pre-historic data monitoring software running. What I want to know is this:
How do I keep this software running permanently? That is, even after I close the remote desktop connection. I also have a perl script that I want to run permanently on the server.
Is this possible?
Many thanks in advance,
Upvotes: 1
Views: 4100
Reputation: 31241
You could create a service to keep the software running. Just have the service start the software and have the service configured on Automatic
so after any server reboots the software will be started again automatically.
If you don't need to monitor the software you can just run it and leave it, close the rdp session. Closing the rdp session won't affect it.
You could use either option to run your perl script and the software.
To create a service:
Download Visual Studio 2010 Express (Free) - (unless you want to shell out a lot of money for the pro versions)
Now create a new Console Application and follow the instructions here
The actual code you will need will be:
System.Diagnostics.Process.Start("pathtoyoursoftware");
That will just start your software.
In the code in the link put the line above in this section:
protected override void OnStart(string[] args)
{
base.OnStart(args);
//TODO: place your start code here
System.Diagnostics.Process.Start("pathtoyoursoftware"); // put here!
}
Or another solution would be to add your program to the registry to start on start up, as an alternative to creating a service:
Open regedit.exe
from the run line.
Browse to the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Run
and create a new string value. Give it a name and then point the value to the exe of your software, this will run your software when the server reboots.
Hope this helps.
Upvotes: 3
Reputation: 56717
The monitoring software will keep running if you do not log out, but simply close the remote desktop using the "x" button. This keeps the user session running.
Upvotes: 1
Reputation: 1563
Other than service,you can add an entry in windows scheduler to execute your perl script at the specified interval.
Upvotes: 1