views:

21

answers:

2

As part of the configuration of my product (after installation), I need to create a few Sharepoint lists on the SharePoint site specified by the user.

Digging around, it seems that i need to write custom code to do this, either using the server-side API as described at http://sarangasl.blogspot.com/2009/11/create-sharepoint-list-programmatically.html, or using the SharePoint List web services. But in both cases, I need to write code to do this.

Is there any out-of-box way to do this, without writing any code? My ideal solution would be to create an XML file which has the appropriate definition, and then run something (passing in the SharePoint site url), which would then create the list, and return a status code indicating success or failure. Is such an ideal solution possible?

If not, what is the best/easiest solution to do this? One of the two above, or something else?

Thanks!

+1  A: 

Create a feature specifying a ListInstance, when you activate the feature, the list will be created: http://msdn.microsoft.com/en-us/library/ms476062.aspx

Vladi Gubler
This is definitely the best and easiest way!
Zeb
A: 

I'd go with the feature as Vladi said.

But you can also install the STSADM extensions from Gary Lapointe. It includes a command to create a list. You can then write a batch file that creates all the lists in 1 go.

ArjanP