/build/static/layout/Breadcrumb_cap_w.png
04/22/2019 248 views

I know this probably has been asked before but I couldn't find it.

I'm wondering if someone can help me. I'm looking to create a custom inventory rule for if file exists echo yes or else no. Something like this below but of course that didn't work.

ShellCommandTextReturn(cmd /c if EXIST C:\ProgramData\Quest\KACE\downloads\64190\setup.exe echo Yes else echo No)

Edit:

I got it to work with just ShellCommandTextReturn(cmd /c if EXIST "C:\ProgramData\Quest\KACE\downloads\64190\setup.exe" echo Yes) but can't figure out how to do the No part.

0 Comments   [ + ] Show comments

Comments


All Answers

0

I can confirm the CIR will work like this:

ShellCommandTextReturn(cmd /c if EXIST "C:\ProgramData\Quest\KACE\downloads\64190\setup.exe" (echo Yes) ELSE (echo No))
Answered 04/22/2019 by: flip1001
Fifth Degree Brown Belt