/build/static/layout/Breadcrumb_cap_w.png

Strange issue with a custom inventory field

Hello,

We use a vb script who detect and list all of the active monitors on our computer into a txt file, we have added this script into our k1000, made a custom inventory field for adding the monitors returned information from the script into our custom inventory field with the command "ShellCommandTextReturn"

Our problem is that the custom inventory field never get the information ...

We have tried with the fileexist command, who return a boolean, and we get a custom software who appear in the software list, that make us think that our custom inventory field is correctly setup. But when we change the command fileexist for the shellcommandtextreturn, the custom program disappear from the software list, and the custom inventory field is still blank.

Could someone help us with this problem ?

Here our K1000 version : v5.3.47927

Thanks by advance

0 Comments   [ + ] Show comments

Answers (21)

Posted by: dchristian 12 years ago
Red Belt
1
Try this:

Shellcommandtextreturn(cmd.exe /c type c:\temp\monitor.txt)
Posted by: dchristian 12 years ago
Red Belt
0
What command are you running?
Posted by: airwolf 12 years ago
Red Belt
0
As David stated, we can't help if you don't give us the custom inventory code you're using.
Posted by: demonvip 12 years ago
Senior Yellow Belt
0
Sorry for the late reply

We use this command :

Shellcommandtextreturn(type c:\temp\monitor.txt)

Normally it should return the text inside the file, but nothing is returned.
Posted by: airwolf 12 years ago
Red Belt
0
The command is correct. Did this used to work and all of the sudden stop working?

I'm guessing this may be a 5.3 bug. Have you contacted support?

Another thought is that you may be exceeding the maximum field size (i.e. the text in the file is too long), and the K1000 may just dump the entire shell output as a result. Try modifying that file on a test system to only contain 1 line of text and try again. If it works, then that is the problem.
Posted by: airwolf 12 years ago
Red Belt
0
I hadn't thought of that, David. Good one!

If that works, then I'm not too crazy about having to call the shell from the shell to get the output of the command... a bit of redundancy (and not the good kind). [;)]
Posted by: demonvip 12 years ago
Senior Yellow Belt
0
Great it works with the "cmd.exe /c ..."

For information, it's the first time we try to make a custom inventory field and it never works before we try with this command.

Thanks a lot for your help.
Posted by: GillySpy 12 years ago
7th Degree Black Belt
0
Did your other command work in 5.1? If so please let us know.
Posted by: tomikuku 12 years ago
Senior Yellow Belt
0
Have the same problem, I`m using custom rule: Shellcommandtextreturn(cmd.exe /c type c:\installedmemory.txt) but no data in computer inventory. Please help
Posted by: scottlutz 12 years ago
Orange Senior Belt
0
Custom inventory rules like this are dependant on a number of factors. Some things to check:

1. Is there data in that file?
2. If you open a command prompt and execute that command, do you get data?
3. Is the machine your testing running an OS that is selected in the Supported OS section of the custom Software Inventory rule?
4. If you look in the KDeploy log, you should see reference to this CI rule being processed. What does it say?
Posted by: tomikuku 12 years ago
Senior Yellow Belt
0
1) There is data in that file:
Memory installed in . (VMware Virtual Platform)
----------------------------------------------
Slot 1 : 1GB EDO DRAM MHz
Slot 2 : -- empty --
Slot 3 : -- empty --
Slot 4 : -- empty --
Slot 5 : -- empty --
Slot 6 : -- empty --
Slot 7 : -- empty --
Slot 8 : -- empty --
Slot 9 : -- empty --
Slot 10 : -- empty --
Slot 11 : -- empty --
Slot 12 : -- empty --
Slot 13 : -- empty --
Slot 14 : -- empty --
Slot 15 : -- empty --
1GB Installed
256GB Maximum

2) Yes I do get output from cmd.
3) I`m testing it on virtual Win7 Ent x86
4) mmm.. where can I find that log?
Posted by: scottlutz 12 years ago
Orange Senior Belt
0
To point 3, you need to go into the custom inventory rule that is running the command to ensure that you have:
Microsoft Windows 7 Enterprise
Listed under "Supported Operating Systems", within the record of the Software Inventory record.


You can find all logs under:
c:\programdata\dell\kace
Posted by: tomikuku 12 years ago
Senior Yellow Belt
0
3) It is being deployed to Microsoft Windows 7 Enterprise

There is no reference to that rule in Kdeploy.log.

Strange thing is that I can see software with custom rule as Installed Programs and no data in Custom Inventory Fields
Posted by: dchristian 12 years ago
Red Belt
0
tomikuku,

What version of the agent are you running?
Posted by: tomikuku 12 years ago
Senior Yellow Belt
0
dchristian,
I`m running: Agent Version: 5.3.44367

and foolowed http://itninja.com/question/silent-uninstall-oracle-8-cilent0701 to set it up.
Posted by: dchristian 12 years ago
Red Belt
0
Try upgrading the latest agent, 5.3.53177 (its pretty sweet).

One last thing, can you post a screenshot of your custom inventory rule and the file on your machine?
Posted by: tomikuku 12 years ago
Senior Yellow Belt
0
Here is screenshot and contents of file:

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Memory installed in . (OptiPlex 980)
----------------------------------------------
Slot 1 : 2GB DDR 1333MHz
Slot 2 : 2GB DDR 1333MHz
Slot 3 : -- empty --
Slot 4 : -- empty --
4GB Installed
16GB Maximum



Posted by: dchristian 12 years ago
Red Belt
0
How about a screen shot of the file location?

I just tested your command on my machine and it works.

BTW i didn't think the more would work but it does.

Is that new or has it always worked?

Also tried changing the more to a type?
Posted by: tomikuku 12 years ago
Senior Yellow Belt
0
Strange thing is tha I get info about that package in Installed Programs scetion in Inventory

In my case it never worked actually :)





Posted by: dchristian 12 years ago
Red Belt
0
That's weird man, it should be working...

Last thing to check, make sure there's nothing after the command in your custom inventory rule (no spaces, or carriage returns).

Try deleting the whole rule and re-creating.

If that doesn't work open up a ticket, because it looks right.
Posted by: tomikuku 12 years ago
Senior Yellow Belt
0
I know, I also tried to return any value from that file with no success. It looks like ShellCommandTextReturn returns nothing.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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