Heres a tricky problem with Enteo, When executing a batch file enteo only gives a batch file 10 minutes to complete before moving on.
Generally speaking this is no problem as how many batch files do you run take over 10 minutes?
This problem came to light for us when enteo began causing our ESX servers to purple screen of death during the pe stage of the build, which resulted in us moving our virtual servers to a stable ESX while we rebuilt. The problem was that the ESX was so slow with all the added servers that our scripted citrix updates were taking over 10 minutes, the script continued, rebooted the server during the updates and low and behold a very sick citrix server.
The trick to get around this, and i recommend this for any batch file you run in enteo, is to create a looping if statement in the enteo script to check for a registry key. Once you have this key created run your updates then delete the key as the last line in your batch file. This will cause enteo to loop even after the 10 minutes leaving your critical updates to install without fear of being.
heres the idea for the enteo script:
execute %systemdrive%longbatchfile.bat /?
:check
if exist regkey goto sleep
del %systemdrive%longbatchfile
Exitproc
:sleep
sleep 60
goto check
And in the batchfile create the reg key, do your work then delete it:
reg add hklmsoftwareenteo /v checkkey
update1
update2
update3
update4
update5
reg delete hklmsoftwareenteo /v checkkey
what will happen is simple, even if the script times out, the script will carry on sleeping until the key is deleted, no matter how long it takes.
After the jump is an example of my code so you can see what we did to get around this 
Continue reading →