Solved

vb.net process.start problem

Posted on 2010-11-23
2
528 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

18 Experts available now in Live!

Get 1:1 Help Now