/build/static/layout/Breadcrumb_cap_w.png

Retrieve List of Mapped Network Drives & Printers via KACE

Is it possible to do this natively in the new version? If not how can it be accomplished?

Thanks

1 Comment   [ + ] Show comment
  • Thank you for the detailed information, I took a slightly different approach to this.

    Create a Online KScript which runs net use and dumps the mapped.txt to %temp%.

    Then I have a CustomInventory to read that file but It's not showing up even after forcing an Inventory. Am i missing something? - anonymous_104535 10 years ago
    • %temp% variable is a user variable so same problem, the cir runs as system and looks at its temp area - SMal.tmcc 8 years ago

Answers (2)

Posted by: SMal.tmcc 10 years ago
Red Belt
1
The printers are under the machines inventory.  The mapped drives are user items so you need to run the query as the user not system.  So a custom software inventory will not directly work.  I use a 2 step approach.  I run a script to create files from the users stand point for a custom inventory's to read.  This runs invisible every couple of hours during the work days.

I use this method to hide the batch file:
http://www.itninja.com/blog/view/how-to-hide-running-a-batch-file-from-a-kscript-with-version-5-5

here is the batch file I run in the script



I then use custom inventories to read the files






Comments:
  • I guess i'm not familiar with the custom inventories feature. where would i go to get to that? getting this setup would be very useful for me. - jcoffey 8 years ago
  • Currently using KACE server 6.4.120261 - jcoffey 8 years ago
  • I think you can disregard, i went to Inventory>software>create new. Looks like where you went. - jcoffey 8 years ago
    • yea - SMal.tmcc 8 years ago
      • when i test run the Kscript, i get this error:

        Script:
        c:\ProgramData\Dell\KACE\kbots_cache\packages\kbots\111\invisible.vbs

        Line: 1
        Char: 1
        Error: The Sytem Could not find the file specified.
        Code: 80070002
        Source: (Null)

        I've checked the directory these scripts are supposed to go to and they are where they are supposed to be (according to the dir location in this error)

        I've checked the scripts several times and they look good.

        I've checked my custom inventory rules several times and they look the way they're supposed to.

        It seems to brought my HKCU run keys into my custom inventory string, but has failed to do so for the mapped drives. - jcoffey 8 years ago
      • see new answer for this info - SMal.tmcc 8 years ago
Posted by: SMal.tmcc 8 years ago
Red Belt
0

This was written for 6.2, if you are 6.3 or 6.4 it will hide the batch file for you now.  you can attach the batch and call it or create a online shell script and paste your lines in there.  Make sure if you create a shell script you rename the extension to .bat
like in this example from another question



Comments:
  • My mapped drives are still not pulling into the custom inventory field. and the text file it generates for the mapped drives into simply turns up blank - no inventory info in it.

    Here is the .bat file:
    reg.exe query hkcu\software\microsoft\windows\currentversion\run /s > C:\ProgramData\Dell\KACE\user\hkcuRunKeys.txt

    reg.exe query hkcu\software\microsoft\windows\currentversion\uninstall /s /f DisplayName > C:\ProgramData\Dell\KACE\user\hkcuSoftware.txt

    wmic logicaldisk where "drivetype='4" get deviceid,providername > C:\ProgramData\Dell\KACE\user\NetworkDrives.txt

    exit

    I also tried this bat as an online shell script like you suggested, but still no dice on the mapped drives. - jcoffey 8 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ