Solved

vb.net process.start problem

Posted on 2010-11-23
2
534 Views
Last Modified: 2012-05-10
I get the following error when trying to run a setup.exe file from process.start:
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
The parameter is incorrect

I can run this exact same path from the run command or from a cmd window in xp with no issues at all, any idea what the issue is?
Process.Start("C:\lxclientsetup\imagectl\setup.exe")

Open in new window

0
Comment
Question by:MaxDes101
2 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 34199580
Try setting the WorkingDirectory like this:
Dim Fullpath As String = "C:\lxclientsetup\imagectl\setup.exe"
        Dim P As New Process
        P.StartInfo.FileName = Fullpath
        P.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(Fullpath)
        P.Start()

Open in new window

0
 

Author Closing Comment

by:MaxDes101
ID: 34199637
Perfect! Thank you sir!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now