By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,396 Members | 2,501 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,396 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* "Wardeaux" <wa******@bellsouth.net> scripsit:
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."

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

P: n/a
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

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:e4**************@TK2MSFTNGP15.phx.gbl...
* "Wardeaux" <wa******@bellsouth.net> scripsit:
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."

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

P: n/a
* "Wardeaux" <wa******@bellsouth.net> scripsit:
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()
....
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.