[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

vb.net process.start problem

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

Independent Software Vendors: 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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

830 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