我被要求查看 Windows 服务器 2003 (我知道... 0)
我没有任何管理这种机器的经验。
基本上,我有一些史前数据监控软件在运行, 我想知道的是:
我如何使这个软件永久运行? 也就是说, 即使我关闭了远程桌面连接, 我也有在服务器上永久运行的 perl 脚本 。
有可能吗?
事先非常感谢,
我被要求查看 Windows 服务器 2003 (我知道... 0)
我没有任何管理这种机器的经验。
基本上,我有一些史前数据监控软件在运行, 我想知道的是:
我如何使这个软件永久运行? 也就是说, 即使我关闭了远程桌面连接, 我也有在服务器上永久运行的 perl 脚本 。
有可能吗?
事先非常感谢,
您可以创建一种服务来保持软件运行。 只要让服务启动软件, 并在 Autommatic
上配置服务, 这样在任何服务器重新启动后, 软件将再次自动启动 。
如果您不需要监控软件, 您可以运行并离开它, 关闭 Rdp 会话 。 关闭 Rdp 会话不会影响它 。
您可以使用任一选项运行您的 Perl 脚本和软件 。
要创建服务 :
下载 < a href=>"http://www.microsoft.com/visualstudio/en-us/products/2010-edimes/visual-charp-表达式" rel=“nofollow” >2010年视觉工作室 Express (自由) -(除非你想为版本提供大量资金)
现在创建一个新的 Console 应用程序, 并遵循指令 < a href=>", http://www. switchonthecode.com/tutorics/ concenture- a- symp- windows- services- in- charp" rel=“ no follow” >这里
您需要的实际代码是:
System.Diagnostics.Process.Start("pathtoyoursoftware");
那只会启动你的软件
在链接中的代码中,将以上一行放在本节中:
protected override void OnStart(string[] args)
{
base.OnStart(args);
//TODO: place your start code here
System.Diagnostics.Process.Start("pathtoyoursoftware"); // put here!
}
或者另一种解决办法是将您的程序添加到登记册中,以便启动启动,以此替代创建服务:
从运行行打开 regedit.exe
。
浏览到密钥 HKEY_LOCAL_MACHINESOTWAREMICROOSWindowsRun
并创建新的字符串值。 给它一个名称, 然后将值指向您的软件的前端, 当服务器重新启动时, 这将运行您的软件 。
希望这能帮上忙
除服务外,您可以在窗口排程器中添加一个条目,以便在指定的间隔内执行您的 perl 脚本 。
如果您不退出, 监测软件将持续运行, 但只需使用“ X” 按钮关闭远程桌面。 这样可以让用户会话运行 。
I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...
Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...
I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...
How can I create an empty file at the DOS/Windows command-line? I tried: copy nul > file.txt But it always displays that a file was copied. Is there another method in the standard cmd? It should ...
I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...
My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...
Yes, I know, the archive bit is evil. That being said, is there support for querying it with find , and modifying it with chmod ? My googling has turned up nothing......
I built a Java application that is delivered on USB sticks. To ensure compatibility, I ship an appropriate JVM on the sticks. I made an EXE that simply invokes this JVM with the application jar. Now ...