Problem running VBScript from my UIAccess VB app using MSScriptControl
Posted
by Ray
on Stack Overflow
See other posts from Stack Overflow
or by Ray
Published on 2010-05-18T15:35:20Z
Indexed on
2010/05/18
15:40 UTC
Read the original article
Hit count: 204
I'm trying to run some VBSCRIPT from within my application. This works fine when I run my program from within VB. But once I add "UIAccess=true" to my manifest and digitally sign my exe with my certificate, I am unable to run the code any more. It gives errors when I try to interface with any program saying "429: ActiveX component can't create object: 'myApp.Application'". Anyone have any idea why it would run fine in the IDE but not with an application with uses UIAccess? Here is the code:
Dim scriptRunner As New MSScriptControl.ScriptControlClass
scriptRunner.Language = "VBScript"
scriptRunner.AllowUI = True
scriptRunner.Timeout = 3000
scriptRunner.AddCode(scriptStr)
scriptRunner = Nothing
© Stack Overflow or respective owner