|
以下是我的程式,要將administrators群組的人員名單列出。
只是多加了日期輸出怎麼程式就沒辦法正常運作了??
#include <Array.au3>
#include <excel.au3>
#include <LocalSecurityAuthority.au3>
#include <Date.au3>
$file = "d:\log\admin\"
$e = @ComputerName
$f = @IPAddress1
$i = @UserName
$log = $file& $e &"_admin.csv"
$j = _Now()
Local $a = _LsaLocalGroupGetMembers("administrators")
_arraypush($a,'')
;ConsoleWrite("k=" & $a[0][0] & @CRLF)
$b = $a[0][0]
;_ArrayDisplay($a)
$d = "1"
For $c = $d To $b Step 1
FileWrite ($log,$y & @TAB)
FileWrite ($log,$e & ",")
FileWrite ($log,$i & ",")
FileWrite ($log,$f & ",")
FileWrite($log, $a[$d][0] & @crlf)
$d = $d+1
Next |
|