Dear,We have an idea about such implementation.
the problem was: how can we count.
solution: create a temporary file on server which can be updated with the
WriteProfileString function.
We know when the limit of active user has been reach by checking the filesize
of that temporary file. We are using for all user an entry with same length.
Code can be:
code:
$check_file="c:\check-install_process"
IF (GetFileSize($check_file) < 167) ; max 6 active users at the same time
$check_key=@date+" "+@time+" "+@ipaddress0
; - lock entry -
IF (WriteProfileString($check_file,"install",$check_key,"busy") <> 0)
ENDIF
;
; your code to copy and install service pack NT SP6a
;
; - unlock entry -
IF (WriteProfileString($check_file,"install",$check_key,"") <> 0)
ENDIF
ELSE
? "Warning KIX-INSTALL: too many users active for an installation run. possible next time."
ENDIF
The temporary file may look like with 4 active users:
code:
[install]
2001/10/18 05:33:08=busy
2001/10/18 05:33:09=busy
2001/10/18 05:33:11=busy
2001/10/18 05:34:52=busy
remark: it can be possible that at exactly the same time two users became active,
which means temporarily an additional user is active. it can happen, but it isn't
necessary and its number will not be very big.
Greetings.