We help IT Professionals succeed at work.
Get Started

System.ComponentModel.Win32Exception when trying to execute vbscript in vb.net

2,889 Views
Last Modified: 2013-11-26
I'm writing a UI for some clients of mine in vb.net with visual studio 2008. Everything works fine until the VB code tries to execute this line of code

System.Diagnostics.Process.Start("CreatePort.vbs")
And this is the error I get
"A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll"

And this happens with any script I try to run in vb.net

Now, I know the script itself works because I've uesed it 3 dozen times over the past 2 weeks, the only thing I can think of is that I'm not calling the script properly.

Any Ideas?
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE