Solved

Executing SQL Server Express (SQLEXPR.EXE) within VB.NET

Posted on 2006-10-25
3
853 Views
Last Modified: 2008-02-07
I am attempting to execute SQL Server Express installation within my VB.NET 2005 application using several scenarios of the following:

Process.Start("Start /wait " & glRootDirectory & "\SQLEXPR.EXE /qb INSTANCENAME=TSF ADDLOCAL=SQL_Engine,Client_Components,Connectivity SECURITYMODE=SQL SAPWD=<password> DISABLENETWORKPROTOCOLS=0")

I continue to get an error 'Specified file does not exist'.  I was able to perform this install from the command prompt and I know that it has to be a syntax issue with using Process.Start as opposed to installing from the command prompt.

I should be able to install using Process.Start shouldn't I?  If so, what is wrong with the syntax of my command line?

Thanks!
Phil Tate
0
Comment
Question by:TSFLLC
[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
3 Comments
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 17805146
The correct command should be

    Process.Start Method ("Program Name with path", "arguments" )

This should be correct if the program Start is in the system path otherwise you will need to fully qualify it. for example C:\myprog\Start.

Process.Start("Start", "/wait " & glRootDirectory & "\SQLEXPR.EXE /qb INSTANCENAME=TSF ADDLOCAL=SQL_Engine,Client_Components,Connectivity SECURITYMODE=SQL SAPWD=<password> DISABLENETWORKPROTOCOLS=0")

Fernando

0
 

Author Comment

by:TSFLLC
ID: 17805468
Fernando,

I figured out that 'Start' is not a separate program....at least it wasn't on a 2000 or XP Pro box.  I kept beating on the command line you specified and decided to attempt to run it from the Windows Run utility with only the SQLEXPR.EXE (path included).  It worked.  Therefore I realized I didn't need 'Start /wait'.

Your posting helped me realize that the application specified has to be separate from the command line parameters.  Therefore this is what worked.

Process.Start(glRootDirectory & "\SQLEXPR.EXE", " /qb INSTANCENAME=TSF ADDLOCAL=SQL_Engine,Client_Components,Connectivity SECURITYMODE=SQL SAPWD=<password> DISABLENETWORKPROTOCOLS=0")

I wouldn't have figured it out without your posting.

Thanks!
Phil
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 17805576
Well I am glad I was able to get you on the right track. Have a great day. ;=)
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

Suggested Solutions

Title # Comments Views Activity
Crystal reports login after closing form 3 35
Visual Studio hangs on running project 6 61
Groupbox Control ? 2 27
vb.net deleting excel sheet in workbook 11 34
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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