TASHAIKH
asked on
MSDE installation problem using VB.net installer package
Hello every body, Iam getting the problem during MSDE Installation. First let me explain what i want to do.
Iam developing a setup programe for my desktop Point of sale application developed in VB.NET . During the installation i want to install MSDE besides my application installation. I developed a seperate wrapper programe that handles all installation steps. First it installs the dot net frame work and then it installs MSDE and then it installs My POS setup developed in VB.net and after that it runs the licensing application developed by myself. During this sequence of execution what is happening? When my wrapper installer programe starts MSDE\Setup.exe then besides this after few mili seconds it starts my POS installation in parallel. I further investigated then i found why is this problem happening. When MSDE setup.exe starts after few mili second it ends the setup.exe process and initiates msiexec.exe process and transfer the control to msiexec.exe, Iam using System.Diagnostics.Process .Start() for running MSDE\Setup.exe. So when setup.exe process ends it starts my next line of code and this line of code runs my POS.exe in the new process and in this way MSDE installation and My POS.exe in parallel. I want to wait my code until MSDE setup completes. I used this code for process wait
Private Sub ExecProcess(ByVal strFile As String)
Dim ReturnValue As Integer
objInstall = New Process
objInstall = objInstall.Start(strFile)
' Wait for the application to finish
Do While Not objInstall.HasExited
Application.DoEvents()
Loop
objInstall.Close()
End Sub
But what is happening when MSDE\setup.exe starts it create 3 msiexec.exe simultaneously i saw this in task manager window, then i tried this approach.
Private Sub ExecMSDEProcess(ByVal strDir As String)
Dim ReturnValue As Integer
Dim objPr() As Process
Dim iLoop As Integer
objInstall = New Process
objInstall = objInstall.Start(strDir & "Setup.exe ", " SECURITYMODE=SQL SAPWD=" & ChrW(34) & "sa" & ChrW(34))
objPr = objInstall.GetProcessesByN ame("msiex ec")
' Wait for the application to finish
For iLoop=0 to objPr.Length-1
Do While Not objPr(iLoop).HasExited
Application.DoEvents()
Loop
Next iLoop
objPr(iLoop).Close()
objInstall.Close()
MsgBox("Completed")
objInstall = Nothing
End Sub
But in this approach programe stucks in do while loop because when msde setup completes it kills the 2 processes of msiexec.exe but 1 remains in execution so thats why this stucks in do while loop due to this process when i kill this process from task manager window it breaks the loop and show me the message completed. Please tell me the solution for this Or suggest me how can i install MSDE with vb.net installer.
Iam developing a setup programe for my desktop Point of sale application developed in VB.NET . During the installation i want to install MSDE besides my application installation. I developed a seperate wrapper programe that handles all installation steps. First it installs the dot net frame work and then it installs MSDE and then it installs My POS setup developed in VB.net and after that it runs the licensing application developed by myself. During this sequence of execution what is happening? When my wrapper installer programe starts MSDE\Setup.exe then besides this after few mili seconds it starts my POS installation in parallel. I further investigated then i found why is this problem happening. When MSDE setup.exe starts after few mili second it ends the setup.exe process and initiates msiexec.exe process and transfer the control to msiexec.exe, Iam using System.Diagnostics.Process
Private Sub ExecProcess(ByVal strFile As String)
Dim ReturnValue As Integer
objInstall = New Process
objInstall = objInstall.Start(strFile)
' Wait for the application to finish
Do While Not objInstall.HasExited
Application.DoEvents()
Loop
objInstall.Close()
End Sub
But what is happening when MSDE\setup.exe starts it create 3 msiexec.exe simultaneously i saw this in task manager window, then i tried this approach.
Private Sub ExecMSDEProcess(ByVal strDir As String)
Dim ReturnValue As Integer
Dim objPr() As Process
Dim iLoop As Integer
objInstall = New Process
objInstall = objInstall.Start(strDir & "Setup.exe ", " SECURITYMODE=SQL SAPWD=" & ChrW(34) & "sa" & ChrW(34))
objPr = objInstall.GetProcessesByN
' Wait for the application to finish
For iLoop=0 to objPr.Length-1
Do While Not objPr(iLoop).HasExited
Application.DoEvents()
Loop
Next iLoop
objPr(iLoop).Close()
objInstall.Close()
MsgBox("Completed")
objInstall = Nothing
End Sub
But in this approach programe stucks in do while loop because when msde setup completes it kills the 2 processes of msiexec.exe but 1 remains in execution so thats why this stucks in do while loop due to this process when i kill this process from task manager window it breaks the loop and show me the message completed. Please tell me the solution for this Or suggest me how can i install MSDE with vb.net installer.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No need to accept this answer i handled this situation by myself after some research. Iam handling 3 msiexec process in my code and then any process exits i also exits from the code and after exiting from the loop kills the remaining 2 process. In this way i solved my problem.
Please close tashaikh account. Iam sorry i didn't know this thats why i made 2 accounts.