I had the same problem before when I added product 11096 (downloadable products) to my store, then the client told me to add new attributes to the product, so I create 1 attribute (Type is Yes / No) and set a set of attributes. Now my problem is how can I edit the whole product and set this attribute to yes or not.if I do not set, then the value is null, so I wrote a few lines of code.
Please check this code, maybe it will help you.
$ProductId = Mage::getResourceModel('catalog/product_collection')
->addAttributeToFilter('type_id', Mage_Downloadable_Model_Product_Type::TYPE_DOWNLOADABLE)
->getAllIds();
$attributeData = array("my_attribute_code" =>"my_attribute_value");
$storeId = 0;
Mage::getSingleton('catalog/product_action')
->updateAttributes($ProductId, $attributeData, $storeId);
source
share