/build/static/layout/Breadcrumb_cap_w.png

K1000 Custom Inventory Rule that reports back shortcut syntax

We have several clients that have a server based application and it is unique based on their location.  I need to create a report or a custom inventory rule that will report back the syntax for the shortcut on each.  Is there a way to accomplish this?  They are all running Windows 7 x86 machines.  We are running Version: 6.2.109330 K1000 and the shortcut is located in the C:\Users\Public Desktop location.

0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: SMal.tmcc 9 years ago
Red Belt
1
You want to do this as a 2 step approach

1 Create a kscript to run a vb script  that creates a text file
2 Create a CIR to read the text file

for this I am using Autocad 2105 shortcut
pKEja8.jpeg

Create this code as a vbscript replacing the name of the shortcut with yours.
Set Shell = CreateObject("WScript.Shell")
DesktopPath = "c:\users\public\Desktop"
Set link = Shell.CreateShortcut(DesktopPath & "\AutoCAD 2015 - English.lnk")
wscript.echo link.TargetPath
wscript.echo link.Arguments
Create a batch file to call the vbscript to file
c:\windows\system32\cscript  /nologo link.vbs > C:\ProgramData\Dell\KACE\user\autocadshortcut.txt
Create a kscript upload the files as a dependency
Y1rjcN.jpeg

The text file will look like this:
C:\Program Files\Autodesk\AutoCAD 2015\acad.exe
/product ACAD /language "en-US"


Create a CIR
ShellCommandTextReturn(cmd /c type c:\programdata\dell\kace\user\autocadshortcut.txt )



Comments:
  • Worked perfectly, many thanks SMal - wd_bs 9 years ago
 
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