KACE Product Support Question
Custom Inventory Rule problems
I am trying to come up with a way to inventory if a machine has dfsutil.exe. However every attempt to do this with custom inventory rules has failed. I have tried the following:
FileExists(C:\Windows\System32\dfsutil.exe) - Does not apply to any machines.
ShellCommandTextReturn(dfsutil) - Only 2 machines out of over 500 had this rule check in for some mysteriously odd reason.
ShellCommandTextReturn(if exist C:\Windows\System32\dfsutil.exe echo dfsutil) - Does not apply to any machines.
Oddly, when I changed the path to the FileExists rule to C:\Windows\System32\fc.exe as a test, all machines detect the rule properly. I did this after making the other rules, so I know that new rules do work if it does not have to do with dfsutil. I do not know why this happens.
Thanks in advance.
Community Chosen Answer
I haven't tested it. But I see a "dfsutil.exe" in c:\windows\system32 only, not in the c:\windows\syswow64. The "fc.exe" file exists in both system32 and syswow64 directories, hence the different results you are getting.
The 2 machines you see with feedback (or the one in the example of SMal.tmcc) are (more than) probably 32bit OSes.
I think it's quite time that Dell starts distributing a 64bit AMPAgent. We no longer have 32bit systems at our company, and we have to think about these stupid workarounds all the time when configuring scripts and rules and so on.
Example : run powershell/vbs scripts that need to write in the 64bit registry. Because they are called by the 32bit agent, they will run in a 32bit context, unless you explicitly use the cscript/wscript/powershell.exe from the sysnative directory. If the agent were 64bit, these files and inventory rules would run in the right context all the time.