Solved

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

Posted on 2006-10-25
3
864 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

Industry Leaders: 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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

729 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