Solved

vb.net process.start problem

Posted on 2010-11-23
2
543 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

690 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