Avatar of Pbbarntt
Pbbarntt

asked on 

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

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?
.NET ProgrammingVisual Basic.NET

Avatar of undefined
Last Comment
Pbbarntt
Avatar of TheRabbi
TheRabbi

Yes, I have seen this before also.

I would bet if you put that in a Try/Catch block and in the catch output e.toString it will say something along the lines of "File not found"
ASKER CERTIFIED SOLUTION
Avatar of Pbbarntt
Pbbarntt

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo