Microsoft’s offer “will surely promote the health of nongovernmental organizations in China,” said Lu Fei, director of a clearinghouse for these groups.

Software piracy is widespread in the 12 countries covered by the new program, and Microsoft has long urged governments to curb it. But in Russia, officials used the intellectual property laws against dissenters.

The security services in Russia have confiscated computers from dozens of advocacy organizations in recent years under the guise of antipiracy inquiries. Some of these groups did have illegal software, and the authorities have said they are carrying out legitimate efforts to curtail software piracy. But they almost never investigate organizations allied with the government.

Microsoft had long rejected requests from human-rights groups that it refrain from taking part in such cases, saying it was merely complying with Russian law.

But now, the organizations would be automatically granted the software licenses without even having to apply for them, meaning that any programs that they possessed would effectively be legalized. That essentially bars the company’s lawyers from assisting the police in piracy inquiries against the groups.

Ms. Anderson of Microsoft said the company was trying to quickly prepare the automatic licenses for the 12 countries, a process that includes translating them, ensuring that they comply with local laws and disseminating them to the authorities.

Microsoft already provides actual copies of software free to some nonprofit groups. It said that in its last fiscal year, it gave out half a billion dollars worth of programs in more than 100 countries. But it has also found that this policy is not well known in some countries.