This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

autobotchk for windrop (Windows XP and Windows Server 2003)

General support and discussion of Eggdrop bots.
Post Reply
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

autobotchk for windrop (Windows XP and Windows Server 2003)

Post by juanamores »

Windows XP (Tested and working.)
1) Create a batch file (* .bat) with any text editor, preferably Notepadd ++, but can be even notepad, making sure that the file extension is BAT and no TXT.
The filename can be anything, i.e autobotchk.bat
BATCH for Windows XP

Code: Select all

@echo off
tasklist /FI "IMAGENAME eq eggdrop.exe" /FO CSV > search.log
FOR /F %%A IN (search.log) DO IF %%~zA EQU 0 GOTO end
cd "C:\windrop\"
eggdrop 
:end 
del search.log
@cls
This line quotes specify the directory path where installed the windrop (eggdrop for windows). Usually it is 'C:\windrop'. If you have it installed on another path, specify it.

Code: Select all

cd "C:\windrop\"
2) Go to Windows scheduled tasks.
To open Scheduled Tasks, click Start, click All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
This link explains in full how to schedule a task in Windows XP.
After scheduled task:
Click the Schedule tab, and then click Advanced.
Click to select the Repeat task check box, and then specify the number of minutes or hours in which you want the task to be repeated.
In the link I shared explains step by step the whole process.

Windows Server 2003 (Non Tested)
1) Create a batch file (* .bat) with any text editor, preferably Notepadd ++, but can be even notepad, making sure that the file extension is BAT and no TXT.
The filename can be anything, i.e autobotchk.bat
BATCH for Windows Server 2003

Code: Select all

@echo off
tasklist /FI "IMAGENAME eq eggdrop.exe" /FO CSV > search.log
FINDSTR eggdrop.exe search.log > found.log
FOR /F %%A IN (found.log) DO IF %%~zA EQU 0 GOTO end
cd "C:\windrop\"
eggdrop 
:end 
del search.log
del found.log
@cls
2) Go to Windows scheduled tasks.
To open Scheduled Tasks, click Start, click All Programs, point to Accessories, point to System Tools, and then click Scheduled Tasks.
This link explains in full how to schedule a task in Windows Server 2003. See How to Create a Scheduled Task
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
p
primus
Voice
Posts: 12
Joined: Fri Jul 31, 2015 10:43 pm
Location: West Coast

Post by primus »

Works like a champ in Win7 too... The instant my thinclient boots, windrop starts. If windrop dies or crashes for some unknow reason, a few minutes later its back...

Setup of the task is the same, however the route to take to get to the scheduler is different. A simple search in control panel will lead you to it...

Thanks for the info!
Post Reply