[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

vb.net process.start problem

Posted on 2010-11-23
2
Medium Priority
?
554 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

656 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