1 of 1 people found this helpful
I don't know which LANDesk version you use, but you can use "Not Exists" in your query for the entry:
Value: your path
I'm trying to find a profile for a specific user but cannot.
I have tried "Computer"."Software"."Package"."Path" = "C:\Documents And Settings\username" but it doesn't give me anything.
I dont believe this is available out of the box.. A few different ways to collect directory information exist, You may want to vb script something to either parse the docs & settings folder names to an array or text and 'if exists' your value, then write it to a reg key for that PC, then include that in your ldappl3.Template.
If you use vb.net, the code below does something similar (finds a file), but i needed to write to a intermediate database, you're welcome to edit and compile if it helps.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim dri As IO.DirectoryInfo
Dim di As New IO.DirectoryInfo("c:\")
Dim fileinfo As New IO.FileInfo("csxview.ma")
Dim diArr As IO.DirectoryInfo() = di.GetDirectories()
Dim fil As IO.FileInfo
Dim FileArr As IO.FileInfo() = di.GetFiles("*.ma", IO.SearchOption.TopDirectoryOnly)
For Each dri In diArr
If dri.FullName = "c:\win32app" Then
Dim dir As String = ("c:\" & dri.FullName)
'Console.WriteLine("Found Directory " & dri.FullName)
ListBox1.Items.Add(dri.FullName & " found")
Dim dirw As New DirectoryInfo(dri.FullName)
Dim fiArr As FileInfo() = dirw.GetFiles("csxview.ma", SearchOption.AllDirectories)
Dim fri As FileInfo
For Each fri In fiArr
If fri.Name.ToLower = "csxview.ma" Then
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim ra As Integer
myConnection = New SqlConnection("server=yourserver;database=TACTUtilities;User ID=youruser;Password=yourpass")
myCommand = New SqlCommand("INSERT INTO RPIcsxview_info (ComputerName, Path ) VALUES('" & My.Computer.Name & "','" & (fri.FullName) & "')", myConnection)
ra = myCommand.ExecuteNonQuery()
Thank you. Way above my head, but thanks anyway.