basic VB script in SSIS

  • I have written a small vb script in Script Task. The script is as below

    Dim a As Object

    Dim name As String

    Dim b As String

    name = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName\ComputerName"

    a = CreateObject("wscript.shell")

    b = a.RegRead(name)

    MsgBox(b).ToString()

    In this script I am not understanding what exactly "CreateObject("wscript.shell")" is doing..?

    Your help is appreciated.

    Thanks

    S

  • how did you write it if you don't know what it does?

    it looks like it is creating an instance of wshell

  • I just started learning VB. this example is from book "Microsoft VB step by step".

  • steveb: Thanks for your help

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply