code:
;
; This script will make an admin connection to the IPC$ share onto a
; list of Target computers. Once you have extablished an connection to the IPC$
; share, you then have full rights to do what ever you want with the targe computer.
;
; Change the "!!!!!place your code here!!!!!" to be your own code that will make the
; required changes on the target computer. this can be a simple cut-n-past of your
; own code, or you can do a CALL command to another kix script.
;
;
; Use the kix script ComputerList.kix to generate a list of all NT computers
; that are in the Domain.
; http://www.neosoft.com/~brycel/kix/other_scripts/Computer_List
;
; The computer list must be in a UNC format. You can provide a username
; and password for systems that that you don't have admin rights on
;
; \\computer1
; \\computer2,<username>,<password>
; \\computer3
; \\computer4
; ....
;-------------------------------------------------------------------------------$computerlist = "clist.dat"
if open(1,"$computerlist",2) <> 0
? '"@serror" opening $computerlist'
? "You must provide a list of target computers for this script to work."
exit
endif
$temp = readline(1)
do
if instr("$temp",",") <> 0
$target = substr("$temp",1,instr("$temp",",")-1)
$targetname = substr("$target",3,len("$target"))
$temp = substr("$temp",len("$target")+2,len("$temp"))
$targetadmin = substr("$temp",1,instr("$temp",",")-1)
$targetpassword = substr("$temp",len("$targetadmin")+2,len("$temp"))
else
$target = rtrim(substr($temp,1,23))
$targetname = substr("$target",3,len("$target"))
$targetadmin = ""
$targetpassword = ""
endif
IF $targetadmin <> ""
use "$target\ipc$$" /user:'$targetname\$targetadmin' /password:$targetPassword
else
use "$target\ipc$$"
endif
Select
case @error = 0
? "____ $target _________________________________________________________________________"
;
;
;
; !!!!!place your code here!!!!!
;
;
;
case @error <> 0
? "____ $target _________________________________________________________________________"
? "Can't connect to $Target -OR- you have insufecent rights"
endselect
use "$target\ipc$$" /delete
$temp = readline(1)
until @error <> 0
exit