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 8735421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:03:19+00:00 2026-06-13T10:03:19+00:00

Hi I have the follow VBS that runs without any problem if I put

  • 0

Hi I have the follow VBS that runs without any problem if I put it in a .vbs file and run it.

Dim objshell
Set objshell = CreateObject("Shell.Application")
objshell.NameSpace("C:\Temp").CopyHere(objshell.NameSpace("C:\Temp\Test.zip").Items())
Set objshell = Nothing

But if I cut and paste it into a script task in SSBI 2008, it runs with the error

Error: 0x1 at Script Task: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80020003): Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
   at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateSet(Object o, Type& objType, String name, Object[] args, String[] paramnames, Boolean OptimisticSet, CallType UseCallType)
   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean OptimisticSet, Boolean RValueBase, CallType CallType)
   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateSetComplex(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean OptimisticSet, Boolean RValueBase)
   at ST_a4312d30d99b4cc4b02a2198afbc77d9.vbproj.ScriptMain.Main()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
Task failed: Script Task

I believe there has to be some configuration inside SSBI to be set instead of just running by default in order to make this working. It doesn’t matter if I will have to use C# instead. But just dont ask me to use and install any 3rd party stuff. The system is running Windows 7 with .NET 4.5 installed.

Please help! Thank you!

  • 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-13T10:03:20+00:00Added an answer on June 13, 2026 at 10:03 am

    I figured out the configuration but it is somewhat complicate.

    1. Open your script task, Edit Script. When the script editing window opens, place the above script to Sub Main with a little changes:

      Dim objshell

      becomes

      Dim objshell As Shell

    2. Go to Project->st_xxxxx Properties, Signing, tick sign the assembly, select New, type any file name, untick Protect my file
      with a password.

    3. Go to References, Add, COM, select Microsoft Shell Controls And Automation, OK.

      ** You should see a popup saying No template information found…, just ignore that. **

    4. Highlight the Microsoft Shell Controls you just added and look at the bottom right properties section, make sure “Strong Name” is True.

      (if you haven’t done step 2., this should be False, redo step 2 and make sure this is True)

    5. Open My Computer and go to the path of the generated Microsoft Shell Controls dll (see the highlighted Path, usually it is C:\Users\xxxxxxx\AppData\Local\Temp\SSIS\yyyyyyyyyyyyyyyyy\obj\Debug\Interop.Shell32.dll). Copy it to somewhere else (its because the original path yyyyyyyyyyyyyy is randomly generated everytime you edit your script, causing that the signed dll gone everytime).

    6. Back to the Project->st_xxxxx Properties, remove the highlighted Microsoft Shell Controls. Click Add, Browse, select the Interop.Shell32.dll you just copied, OK. Again, make sure the Strong Name property is True. If not, redo from step 2.

    7. Still at References, under Imported namespaces, scroll down to tick the box next to Shell32.

    8. Go to Signing, untick Sign the assembly. Go to Project Explorer on top right, delete the key file (xxxx.snk) you created at step 2 (delete the key file within Project Explorer, not from your folder, make sure it is not included in your Project Explorer anymore or your script task wont run).

    9. Save all and close the Script Editing window.

    10. Locate “gacutil.exe” in your computer. You should have it together with the installation of SSIS. Its under C:\Program Files
      (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64. Type gacutil -i “path of
      your copied Interop.Shell32.dll in step 5”.

      e.g. gacutil -i F:\Code\Interop.Shell32.dll

    After all these steps, your script task should run without problems. Of course, these steps are needed if you are using other COM references. Let me know if there are some easier ways to do the job. Hope this helps.

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

Sidebar

Related Questions

Hello i have the follow problem. I have e XML file and i know
I currently have a .vbs file being run at a daily time scheduled in
i have follow taxomony has been set up: accommodation -backpacker -guest -holiday and i
I have a follow up question to this one . Now that I have
Currently I have the follow ps that reads a list of user names and
I have 5 or 6 classes that I want to have follow the same
guys! I have follow question. I am writing an application that will track movement
Have the follow code which works if I put the 'filter' on the ul
I have the follow script that uploads and image and a thumbnail to a
I have the follow XML File: <Questionario> <Relacoes Marca=SADIA> <Questao> <IDEtapa> 1 </IDEtapa> <IDQuestao>

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.