Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8978233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:33:40+00:00 2026-06-15T19:33:40+00:00

We have a number of custom scripts that were written in VBScript for SDL

  • 0

We have a number of custom scripts that were written in VBScript for SDL Tridion 5.2. These scripts use the TOM API to perform a number of bulk actions on Tridion objects.

Following a recent upgrade to 2011 SP1, we now have a requirement to change the component template used in a large number of component presentations, and the best way to do this would be to run a script to update the necessary pages and component presentations.

Previously, we could run some VBScript similar to the code below to make this change. In 2011 can we still run these scripts to make this sort of change?

Is it as straightforward as enabling Classic ASP on the Content Manager server (Windows 2008 R2)?

<%
'##### CREATE TRIDION API OBJECTS #####
Set TDSE = Server.CreateObject("TDS.TDSE")
Call TDSE.Initialize()

'##### CALL FUNCTION - PASS IN STRUCTURE GROUP STARTING POINT #####
Call UpdateComponentTemplates(TDSE.GetObject("tcm:44-39929-4", OpenModeEditWithFallback, "tcm:0-44-1"))

Sub UpdateComponentTemplates(arg_strStructureGroup)
    '##### GET ALL ITEMS WITHIN SPECIFIED STRUCTURE GROUP #####
    For Each objItem In arg_strStructureGroup.GetItems
        '##### IF ITEM IS A STRUCTURE GROUP #####
        If TypeName(objItem) = "StructureGroup" Then
            '##### CALL THE FUNCTION AGAIN, PASSING IN THE STRUCTURE GROUP #####
            Call UpdateComponentTemplates(objItem)
        End If
        '##### IF ITEM IS A PAGE #####
        If TypeName(objItem) = "Page" Then
            For Each objComponent In objItem.ComponentPresentations
                '##### CHECK EXISTING COMPONENT TEMPLATE & UPDATE WITH THE NEW ONE #####
                If objComponent.ComponentTemplate.ID = "tcm:44-493-32" Then
                    'objComponent.ComponentTemplate = "tcm:44-216181-32"
                    'objItem.Save(True)
                    '##### OUTPUT STATUS MESSAGE #####
                    Response.Write(objItem.Title & " ......................... UPDATED<br />") & vbCrlf
                    Response.Flush()
                End If
            Next
        End If
    Next
End Sub

Response.Write("<p>Job Done!!!</p>") & vbCrlf

'##### CLEAN UP OBJECTS #####
Set TDSE = Nothing
%>

I know this could probably be done using the Core Service, but without knowledge of this code or .Net, is it still possible to use VBScript to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:33:41+00:00Added an answer on June 15, 2026 at 7:33 pm

    Yes, this works in 2011 because the TOM COM+ API is still supported. I recently ran a very similar script on a 2011 system successfully. If you’re updating a lot of items you might want to move it to a .net console app because the template or web page might timeout. If you do this then make sure to use marshal.releaseobject for all the TOM objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom script to import a bulk number of customers to
I have a custom function that looks up the current number of likes for
I'm using the Silverlight 3 datagrid and have a number of custom styles applied
I have created custom cell in which there are n number of image views.
I have a simple custom NumberField: class NumberInput(forms.widgets.Input): input_type = 'number' class NumberField(forms.DecimalField): def
I have a number input that should trigger jQuery on every change. To do
We have a number of data objects that realize INotifyPropertyChanged to allow for WPF
I have a script in Filemaker that calls a Brian Dunning hosted custom function
I have a problem with an image that I am applying a custom jquery
I have a custom jQuery script that works fine in all bowsers but one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.