cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
leifop
Level 3

PutValue

According to the documentation there's a function named PutValue() that can be used to enable/disable the Update Service.

1. I can't find this function in the .tlh interface header file. I do find a function named "put_value", but with slightly different arguments than the documented PutValue function. I also find a corresponding "get_value" function. Are these the functions I should use in C++ to enable/disable the Update Service, as well as query for the enable-state ?

2. If the answer to 1) is "yes", what type of VARIANT do the functions expect in the third argument when enabling/disabling the Update Service.

3. What exectly does enabling/disabling mean in the context of PutValue() ? Will disabling e.g. mean that the service does not start when the PC boots, so that I am guaranteed that there will be no generated network traffic (this could be an issue for "paranoid" customers) ?

Regards,
Leif
0 Kudos
(2) Replies
Chris_Woerner
Level 10

We do have two functions that you can use to set ISUS parameters:

get_value
put_value

The help documentation is lacking on these topics and will be greatly improved in the next release. However, one of the parameters that you can view/set is ServiceLevel. With ServiceLevel set to 0, the ISUS will be disabled. No check for updates will be done.

The idea: via a menu option you can offer a configurations area. The user can choose to enable/ disable software updates. If the user chooses disable > you would call put_value to set the ServiceLevel = 0. This would disable the update checking.
0 Kudos
leifop
Level 3

That's fine, but I still can't get figure out how to use the arguments in the put_value()/get_value() functions.

I've tried the following code to get the current settings:

CComBSTR valueName(L"ServiceLevel");
VARIANT value;
HRESULT hr = spAgent3->get_value(productCode, valueName, &value);

The call to get_value succeeds and the vt field of "value" is set to VT_BSTR. All other fields in "value" are set to zero, however.

The call also succeeds in the same manner if I set the "valueName" string to something other than "ServiceLevel", so it does not look like "valueName" is used at all.

So my question is: How do I use get_value/put_value ?

Regards,
Leif
0 Kudos