Hi, I have needed to find out if sufficient permissions for remote
execution so I have little modified LocalAdmin function from
http://www.kixtart.org/ubbthreads/showfl...3&o=all&fpart=1
to this (but untill now tried only on local PC):

Function LocalAdmin(optional $sComputer)
; Insure $sComputer has "\\computername\" format if it is specified
If $sComputer <> ''
$sComputer = '\\' + Join(Split($sComputer,'\'),'',3) + '\'
EndIf
$LocalAdmin=ingroup($sComputer + sidtoname('S-1-5-32-544')) - 1 + @inwin
EndFunction


By testing I have found some unwanted effects (features...)

$RemotePC = @wksta
?InGroup($RemotePC + '\' + SidToName('S-1-5-32-544')) - 1 + @InWin
; got 1

$RemotePC = '\\' + @wksta
?InGroup($RemotePC + '\' + SidToName('S-1-5-32-544')) - 1 + @InWin
; got 1

$RemotePC = 'localhost'
?InGroup($RemotePC + '\' + SidToName('S-1-5-32-544')) - 1 + @InWin
; got 0

$RemotePC = '\\localhost'
?InGroup($RemotePC + '\' + SidToName('S-1-5-32-544')) - 1 + @InWin
; got 0

$RemotePC = '127.0.0.1'
?InGroup($RemotePC + '\' + SidToName('S-1-5-32-544')) - 1 + @InWin
; got 0

$RemotePC = '\\127.0.0.1'
?InGroup($RemotePC + '\' + SidToName('S-1-5-32-544')) - 1 + @InWin
; got 1


What I don't understand is syntax - it seems from previous sample
that @wksta and '\\' + @wksta are equivalent. Is it correct?

And never tried this before, but it seems that MS implemented TCP/IP
very interesting - used services don't know localhost. If you try
`start \\localhost' you get:
"You were not connected because a duplicate name exists on the network. Go to
System in Control Panel to change computer name and try again."