Programmatically create or join a home group

351 Views Asked by At

I am trying to write a utility to walk users through connecting and setting up their network. One requirement I have is to create or join a home group. I have been able to find IHomeGroupProvider.JoinHomeGroup or HomeGroupManager.JoinHomeGroup but I don't know how to get an instance of IHomeGroupProvider. It looks like its in wsshomegroupobjectmodel.dll, but I am not sure if that is only available in windows server or how to get in there in Windows 7.

I think I need to create an instance of HomeGroupManager, but again, I don't know where to get the DLL.

1

There are 1 best solutions below

2
On

If I am reading it right, I think this MSDN article says that the 'Windows Server Solutions SDK' is packaged in with the Windows Server 2008 R2 SDK which can be downloaded here.

Once you've got that installed you should be able to use HomeGroupManager.JoinHomeGroup without having to manage a IHomeGroupProvider instance.