Trace: » Script of installation of agent OCS with creation of a planned spot “random”

Script of installation of agent OCS with creation of a planned spot “random”

In my company, we do not wish to use agent OCS in service mode. We however need to have daily inventories. We started by using a launching clée in register base, but, being waiters the openings of sessions are not frequent enough.

I thus decided to create a planned spot allowing to daily launch an inventory on my 600 waiters. The problem was the following. How to create 600 spots planned on all my waiters without having to pass to the hand on each one two, and especially how to make so that my 600 waiters do not inventory all at the same time?

The solution, to create a script which will be thorough by a third tool on all the waiters and which while being carried out, will create a planned spot of which the hour of launching will be generated by chance. I thus pushed this single script on the 600 waiters, I had programmed the thing so that it does not generate spots between 23:00 and 1:00, due to stopping of the waiter ocs at these hours.

Result, the inventory of the 600 waiters is spread out throughout the day, on average 1 waiter all the 2minutes. No the Rush hour on my waiter ocs… coool

This script can of course be used to create any other spot planned “random” One little also to make the day of release random, in addition to the hour …..

Script in question Initially small achievable should be downloaded which makes it possible to generate a random figure. Random.exe to download here

For information, there exists under Windows 2000 and more, one function %random% which makes it possible to make similar, except that a priori, the function launched on several waiters, per same hour, generates the same figure ….. That it is the random one…. The exe that you will also find on the site of optimumx walk with nt4 and it is more powerful than the integrated function Windows.

I use two files markers. 4026.ok which indicates if the agent has days or not. (for an agent in version 4026) and ocstask.ok which prevents generating multiple spots planned, if one carries out several times script by erreure.

Script presented Ci below is to be modified according to your needs. So that it goes such as it is it is necessary to put at the same level the file ocslogon.exe modified in “monserveurocs.exe” and the random.exe