Thursday, October 18, 2007

The system cannot find the file specified. CreateObject

I was attempting to use some vb.net code in a vbs file and was getting "The system cannot find the file specified." on the CreateObject line. I tracked it down to the way I registered the DLL.

One sugestion told me to unregister and re register it with regsvr32. Because I was using .NET, I knew that was not it. It turned out to be my use of regasm to register my DLL. I left out the /CODEBASE option.

Once I registered it with that option, the error went away.

10 comments:

  1. Anonymous9:48 AM

    Thanks! I believe this is the very issue I'm having as well.

    ReplyDelete
  2. Anonymous5:13 PM

    THANK YOU!

    I was totally lost until finally finding your article. Your are doing the world a wonderful service.

    David

    ReplyDelete
  3. Thanks - been haunting me for a couple hours!

    ReplyDelete
  4. Thanks! there would be lot of people faced this problem and solved.. but only few blog it.. you are one. Great.

    ReplyDelete
  5. Anonymous8:41 AM

    Thanks a lot. Your post was very helpful.

    ReplyDelete
  6. Anonymous12:50 PM

    Thanks , saved my day.

    ReplyDelete
  7. Thanks, that worked :)

    regasm myTest.dll /tlb:myTest.tlb /CODEBASE

    ReplyDelete
  8. Anonymous9:46 AM

    Wow! Thank you so much!

    ReplyDelete
  9. Anonymous2:49 PM

    Very good :)

    ReplyDelete
  10. Anonymous11:12 AM

    Can you explain me how to solve this error step by stem as i am kin of newbie in vbscript.

    ReplyDelete