Game daemon - WINDOWS version, is written with VBS, for x86 and Windows
2003 X64 in Windows
2003.
The opening of the game program generally needs to be opened in the specified order. Here, the standard db-gs-gg architecture is taken as an example. The normal opening order is db-gs-gg, if the gg program is hung up. In general, our manual judgment process is to first determine whether the db program is normal, and then determine whether the gs program is normal, there is no problem, and then open the gg program, the script is processed according to the principle of the relationship relationship judgment.
All configuration information is stored in setting.ini
“Description
“Name configuration service or program, name, set to task manager Image name in
“type item configuration needs to be daemoned as S (service) or P (program)
‘the absolute path or service name of the process item configuration program, if The daemon and program are placed in the same directory. The relative path can be configured.
“The related item configuration is (Y)No(N)The associated program
“The log entry configuration log storage path, the default Deamon.log, store daemon directory
[Settings]
Name= EMeditor.exe
= S-type
Process= zhudongfangyu
Related = Y
LOGFILE =
relate_ip item configuration associated program, /service IP, local configurable local host
relate_port item configuration associated program, /The port number of the service currently only supports TCP port
[related]
relate_ip = 192.168.30.109
relate_port = 139
If the association is configured, That is, replace=y, the program will be automatically judged before the program is started. Is normal, use check_tcp, is a third-party judgment tcp port program that will check_tcp.zip the check_tcp.exe on setting.ini the same directory can be.
The main source code of the daemon is as follows:
Continue to the next step when error occurs
path=left (Wscript.ScriptFullName, LEN(Wscript.ScriptFullName)LEN(Wscript.ScriptName ))
‘Defining functions
GetFile(strPath, date contact)
Setting objFSO=CreateObject(“Scripting.FileSystemObject”)< Br>
Set objFile = objFSO.OpenTextFile(strpath 1)
Do it until objFile.AtEndOfStream
strLine = objFile.ReadLine
If INSTR(strLine, date Contact)
GETFILE = strLine
If the last
loop
objFile.Close
End of function
&lsquo ;End of function
Setting ObjFS=CreateObject(“Scripting.FileSystemObject”)
‘Read configuration file
settingfile =“setting.ini”
Name= GETFILE(name of settingfile“)
PTYPE = GETFILE(settingfile,“type=”)
Process = GETFILE(settingfile,“process= ”)
Involved = GETFILE(settingfile,“involved=”)
LOGFILE = GETFILE(settingfile“'s log file=)
RNAME = LCASE (right (name, LEN(name)-5) )
rtype = LCASE (Right (PTYP E, LEN(PTYP E)-5))
rprocess = LCASE (Right (in process, LEN(process)-8 ))
rrelate=right(correlation, LEN(involved)-7)
rlog=right (log, LEN(log)-8)
“ Whether the log directory is set
if rlog =“”, then
rlog“deamon.log”
If the last
determines whether the record exists < Br>
If objFS.fileExists(rlog)= FLASE then
objFS.CreateTextFile(rlog)
Set objNF1 = objFS.OpenTextFile(rlog 8)
The tasks performed during Win10 automatic maintenance include software updates, security scans, and
The screen brightness caused by sunflower software cannot be adjusted1, right click on my computer--
Microsoft clearly stated in the new version of Win10 License Terms that Win10 Home Edition will auto
Some friends who have already used the Win10 system ask how to delete unnecessary useless wireless n
Win10 upgrade can not find $Windows.~BT hidden folder solution
Win10 users are unlucky. Privacy issues some BT seed stations shield P2P services
Windows system uses the cmd command to install and uninstall the service
What if win7 can't boot? Solve the method of boot error code C0000034
How to complete the Windows system runtime/game runtime component?
Win10 system Apache can not start after installing XAMPP
What should I do if the Insider setting item is not available in Win10 RS2 Preview 14905?
Win10 shortcut key operation Daquan
How to set the boot password in win10
How to retrieve the MSI installation package Win7/Win8 administrator identity function
How to add quick access to File Explorer in Win10 taskbar?
Win7 can't access the shared printer how to solve
Win10 new patch KB3167685 caused Flash crash
Win10 system Lu master can not run how to do
Win8 system does not show how to solve wifi?
Win8.1 Update full image download leak
Win8.1 closes the method of dynamic tile
Win8 system "text change error" prompts how to do
WinXP computer anti-virus software can not open the solution
Can the Win7 Recycle Bin icon status not be updated in real time?