Capone : works but less options
we use capone, it works fine, but now we have to enter the exact value in the “DMI results” field
in 0.32 wiki say : “Then enter the matching value for the DMI field in the text field. This string can be treated as a ‘starts with’ query. So if you use the field [B]system-serial-number[/B] and you have a group of computers that all start with [B]112233[/B] then you can enter that into the text field and it would match a client with the system-serial-number of [B]1122334455[/B]”
in 1.0.1 : If you have a 1234 machine, a 1235 machine and a 1236 machine you can’t enter “123” but one matching for each.
normal or not ?
Someone already solve this ?
Thank you! Thank you! Thank you!
1766 : all is OK
NM, I’ll fix and send it up.
This is the line you changed?
[php]throw new Exception(base64_encode((count($ret) > 0 ? implode("\n",$ret) : ‘null’)));[/php]
It should only send a “null” if it can’t find the data you’re requesting. This line should NOT be changed. While it works for you, it may break other things down the line.
If you’re good with commenting and changing it out, that’s great, but when/if you have issues, You will NEED to specify that you made your own changes as it makes it extremely difficult for us to help you troubleshoot especially if you’re customizing your own code.
I do what xvierc said on the previous post : “I removed the base64_encode from the thrown exception on line 42”
[quote=“TheKoR, post: 28597, member: 24285”]1765 : unable to determine OS type
I change line 42 and it’s OK[/quote]
What did you change it to? This helps us when you leave information rather than just saying you solved the issue.
1765 : unable to determine OS type
I change line 42 and it’s OK
Bad news: comes back with an error saying its unable to determine OS type. Looks like it’s because the information is encoded twice. When I removed the base64_encode from the thrown exception on line 42, Capone works fine afterwards, both with a DMI match and without (gives the no image found error).
Sorry Tom, I know you want to be done with capone.php :)
if you can try 1760 as I’ve added the suggestion and counter.
Thanks! It is working. With no matches, it stays at “Looking for images…”, which is enough of a hint for now.
try 1759, it it finds a match it will do it’s thing, if not, nothing is returned and will give you a blank screen. I’ll try a better means anyway, but for now it should be fine.
Your code base could be easily minimized with:
[php]throw new Exception((count($ret) > 0 ? implode($ret) : base64_encode(‘null’));[/php]
Break ends the foreach statement, but throwing an exception breaks out of the whole try statement, so the results of the change are the same as before, unfortunately.
I’m new to PHP so this is just an idea and there’s probably better ways. But with how its written you’d probably need an int counter or something like this:
[code] case 4:
$imgType = ‘dd’;
$ret = base64_encode($Image->get(‘path’).’|’.$OS->get(‘id’).’|’.$imgType)."\n";
foreach($ret as $retP)
just removed the break, but I still need a means to inform the user that there was no definition found based on the sent params. Try 1758 if you can?
Take a look at services/capone.php, and try commenting out lines 43 and 44. It looks like it’s searching through all the DMI definitions, but if the first definition doesn’t match what its looking for it stops entirely. I was able to get a correct image match afterwards, but then ran into problems of my own (unrelated) when it got to the transfer process.
Try with HP Compaq 8510p, work before update. Don’t work now
Before i update to 1754, “HP Compaq 6530b (NJ796UP#ABF)” work, and now not
wmci calls :
i’ll try with other models !
Do any of the others, ie Latitude E5430 work, I realise you may not have had the opportunity to try any others.
could you post the response from both wmic calls please, just for confirmation.
The DMI Result is : HP Compaq 6530b (NJ796UP#ABF)
1754 still don’t work
And inventory on this machines don’t work, so i can’t copy past from GUI to GUI
And sorry Tom for the lack of explainations on first post, i never used serial number, always product name.
Some machines,(Hp and Lenovo) have a different type in each modele, HP Compaq 6530b (NJ796UP#ABF) or HP Compaq 6530b (KE821AV) are identical, and don’t want to start nor in full nor in short text.
1753 released with non case-sensitive string comparison.