Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

860 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