Calling a "Setup.exe" using Process.Start()

W

Wardeaux

All,
I've written a "setup" wrapper that calls a sequence of "setup.exe", and
all works except when I call the setup.exe for the MSDE, then it gets about
half way through and then hangs... The MSDE setup works fine from a CMD
prompt... anyone know of articles or known issues with this technique, and
what are my alternatives to having my user install several "Commandline
parameter intensive" setups to get this installed? :)
MTIA
wardeaux
 
H

Herfried K. Wagner [MVP]

* "Wardeaux said:
I've written a "setup" wrapper that calls a sequence of "setup.exe", and
all works except when I call the setup.exe for the MSDE, then it gets about
half way through and then hangs... The MSDE setup works fine from a CMD
prompt... anyone know of articles or known issues with this technique, and
what are my alternatives to having my user install several "Commandline
parameter intensive" setups to get this installed? :)

"Post your code."
 
W

Wardeaux

Herfried
Thanks for the reply... here's the code... let me know what you find!

Many MANY thanks!

wardeaux

Dim strFileDest As String
Dim myproc As Process
strFileDest = "C:\Program Files\EZJobTracker\"
lblStatus.Text = "Installing MSDE..."
Application.DoEvents()
If (Application.CommonAppDataRegistry.GetValue("MSDE", "Start") <> "Finish")
Then
Application.CommonAppDataRegistry.SetValue("MSDE", "Start")
myproc = Process.Start(Application.StartupPath & "\MSDERelA\Setup.exe",
" SAPWD=""EZJT_DB_SA"" INSTANCENAME=""EZJT_DB"" TARGETDIR=""" & strFileDest
& """ SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0")
myproc.WaitForExit()
Application.CommonAppDataRegistry.SetValue("MSDE", "Finish")
End If
 
H

Herfried K. Wagner [MVP]

* "Wardeaux said:
Dim strFileDest As String
Dim myproc As Process
strFileDest = "C:\Program Files\EZJobTracker\"
lblStatus.Text = "Installing MSDE..."
Application.DoEvents()
If (Application.CommonAppDataRegistry.GetValue("MSDE", "Start") <> "Finish")
Then
Application.CommonAppDataRegistry.SetValue("MSDE", "Start")
myproc = Process.Start(Application.StartupPath & "\MSDERelA\Setup.exe",
" SAPWD=""EZJT_DB_SA"" INSTANCENAME=""EZJT_DB"" TARGETDIR=""" & strFileDest
& """ SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0")
myproc.WaitForExit()
Application.CommonAppDataRegistry.SetValue("MSDE", "Finish")

Try something like this (written from scratch):

\\\
Imports System.Diagnostics
Imports System.IO
..
..
..
Dim psi As New ProcessStartInfo()
With psi
.FileName = Path.Combine(Application.StartupPath, "MSDER...")
.Arguments = ...
End With
Dim p As Process = Process.Start(psi)
p.WaitForExit()
....
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top