IT Management Suite

 View Only
  • 1.  Custom Inventory %userprofile%

    Posted Dec 29, 2017 04:17 AM

    Hi all,

     

    i've a problem with a custom inventory.

    I would like find is a string are in a file under %userprofile\appdata\LocalLow\....

    So i've created the custom dataclass, coded a vbs script that read this file and return 1 if it founds the string and 0 if it does not found the string.

    It's working but the script must be runned like "current logged user" (if i run the inventory like Local System Account the %userprofile% variable does not exist). With "Current Logged User" the custom sql table does not be popolate, i think because there are some permission missed.

     

    Can you help me?

     

    Thanks



  • 2.  RE: Custom Inventory %userprofile%

    Posted Dec 29, 2017 10:08 AM

    Can you share your script?

    It maybe easier to make the script be per machine then per user.

    Update your dataclass to accept multiple rows and update the script to enumerate all user profiles on the machine.

    https://blogs.technet.microsoft.com/heyscriptingguy/2005/06/03/hey-scripting-guy-how-can-i-list-all-the-user-profiles-on-a-computer/

    Iterate through each profile, look for XYZ file, and if found, open and read value.

    My $0.02