/build/static/layout/Breadcrumb_cap_w.png

Want certain scripts to run every time the inventory runs? Use CIR's to run the commands, they run at the start of the inventory cycle.

I have found a trick where you can imbed vb scripts or dos batch scripting in a CIR and have that code execute while gather no information.

If you look at these blogs you will see that I use ShellCommandTextReturn(cmd /c to do the work of a kscript.  Nothing says it has to return results just execute the code.

In this blog I use a CIR to generate a text file for other Cirs to harvest information from:

ShellCommandTextReturn(cmd /c @echo off  & del c:\programdata\dell\kace\user\bios.txt & "C:\Program Files\Dell\Command Configure\X86\cctk.exe" -o=C:\ProgramData\Dell\KACE\user\bios.txt & "C:\Program Files (x86)\Dell\Command Configure\X86_64\cctk.exe" -o=C:\ProgramData\Dell\KACE\user\bios.txt)

http://www.itninja.com/blog/view/cir-s-how-to-read-any-part-of-the-dell-bios-into-the-k1000

I have a cir to delete a link file if it exists

ShellCommandTextReturn(cmd /c if exist "C:\Users\Public\Desktop\Configuration Wizard.lnk" del "C:\Users\Public\Desktop\Configuration Wizard.lnk" /q)

In this blog I use a vb script to call a batch file:

http://www.itninja.com/blog/view/create-a-cir-to-get-a-clean-list-of-your-local-admins-and-then-filter-out-the-it-approved-admins-also-presented-at-dell-world-user-forum-2014-lessions-from-the-field

you can use the first part of that CIR to call vb scripts with

ShellCommandTextReturn(cmd /c cscript /b c:\programdata\dell\kace\user\fadmins.vbs)

None of these scripts return any results so there is no clutter from them under the machines Custom Rule section


Comments

This post is locked
 
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