I have this working to a degree and have another "problem"

 Code:
$PC = 'sn999999'     ; No backslashes

$cn = CreateObject("ADODB.Connection") $cmd = CreateObject("ADODB.Command") $rs = CreateObject("ADODB.RecordSet")
$cn.connectionstring = "Provider=Search.CollatorDSO;Extended Properties='Application=Windows';"
$cn.open			If @error	? 'Unable to connect to Windows Search'	endif
	$cmd.activeconnection = $cn	$rs.cursortype = 3	$rs.locktype = 3	$rs.activecommand = $cmd
	$cmdtxt = "SELECT System.ItemFolderPathDisplay, System.ItemName FROM "+$pc+".SystemIndex WHERE scope='file://"+$pc+"/c' and Contains(System.FileName,'.url')"
	$cmd.commandtext = $cmdtxt
	$rs.open($cmd)		If @error	? @serror	endif
		$rs.MoveFirst
		$count = 0
		While Not $rs.eof
			? $rs.fields.item("System.ItemFolderPathDisplay").value 
			? $rs.fields.item("System.ItemName").value 
			?
			$count =$count +1
			$rs.moveNext
		Loop
	? $count 
	$rs.close
$cn.close


The remote query works, but it must be a real share, not an administrative share.

I made a share called "c" which works, but C$ doesn't... which is kind of a PITA.
_________________________
How to ask questions the smart way <-----------> Before you ask