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:
Please log in to answer
Posted by:
SMal.tmcc
9 years ago
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
Create this code as a vbscript replacing the name of the shortcut with yours.
The text file will look like this:
Create a CIR
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
Create this code as a vbscript replacing the name of the shortcut with yours.
Set Shell = CreateObject("WScript.Shell")Create a batch file to call the vbscript to file
DesktopPath = "c:\users\public\Desktop"
Set link = Shell.CreateShortcut(DesktopPath & "\AutoCAD 2015 - English.lnk")
wscript.echo link.TargetPath
wscript.echo link.Arguments
c:\windows\system32\cscript /nologo link.vbs > C:\ProgramData\Dell\KACE\user\autocadshortcut.txtCreate a kscript upload the files as a dependency
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