COM internally uses LSA secrets to store the runas password for a COM server. The Platform SDK DCOMPerm sample illustrates how to programmatically set the runas password of a COM server identity using LsaOpenPolicy and LsaStorePrivateData on the local server. To set the runas password of a COM server identity on a remote server, you can modify the sample by passing the remote server name to LsaOpenPolicy. The modified DCOMPerm works fine between two Windows 2003 machines. However when you run it on a Windows 7/Windows Server 2008 R2 machine and attempt to set the runas password on a remote Windows 2003 server, the remote COM server fails to run and the following error is received:
0x8000401a: The server process cannot be started because the configured identity is incorrect. Check the username and password.