C# code equivalent for STSADM AddTemplate.

Posted on 2011-04-25
Last Modified: 2012-05-11
I was wondering whether ther was a C# code equivalent for STSADM AddTemplate.

Thank you
Question by:snazaire
    LVL 9

    Expert Comment


    Author Comment

    I checked this link already and it doesn't answer the question. I need this answer from a programmer.

    LVL 8

    Accepted Solution

    You can use the Process class to create a new STSADM  process and pass AddTemplate as parameter.
    Hope this helps, best regards.
    Process.Start("STSADM .exe", "AddTemplate");

    Open in new window


    Author Closing Comment

    That was the actual solution. Thanks

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
    We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now