I have this home grown executable that I want to run via a script.  This program searches the users' C drive for office documents and reports it's findings back to an SQL database.  I have created the script on the K1000 several different ways with no success, the program crashes or doesn't run at all.  There is a config file that I have added as a dependency along with the executable.  If I run it manually from the kbot folder, it works fine, but if I run it as logged on user or specify an account to run as, it crashes.  If I run it as local system, it does nothing.  Is there any other method I can use to accomplish this using the K1000 and scrap this exe altogether?  I need to know if users are storing office documents on their C:\ drives, that's it.


0 Comments   [ + ] Show Comments


Please log in to comment



you can create a custom inventory rule to scan the drive and run a kace report for that software item.


Answered 09/05/2013 by: SMal.tmcc
Red Belt

  • That works, but how can I exlude the appdata folder, becasue there is a lot of temprary files that I do not care about? Thank you
  • I believe you need to add a not like function

    where ("your search string you have now" AND NOT path like "%%AppDat%%")

    http://windowsitpro.com/windows/using-not-statement-wmi-query talks about NOT

    and if you open a command window and type
    wmic datafile get /?
    it will show you all the search options you can use in the your where statement
  • Works! Thanks again
  • The list from the report is very long. Do you know of way to summerize this somehow? Also, I would like to query for every type of Office docs and pdfs. Here is what it looks like now.

    ShellCommandTextReturn(c:\windows\system32\wbem\WMIC.exe datafile WHERE "drive='c:' AND path like '\\users\\%%' AND NOT path like '%%AppDat%%' AND Extension='doc'" get name)
  • If I could get a total of each different type of office docs on each machine, I would be very happy.
Please log in to comment
Answer this question or Comment on this question for clarity