Solved

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

Posted on 2006-10-25
3
832 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
  • 2
3 Comments
 
LVL 62

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 62

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

12 Experts available now in Live!

Get 1:1 Help Now