?
Solved

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

Posted on 2006-10-25
3
Medium Priority
?
874 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

770 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