• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 630
  • Last Modified:

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.GetProcessesByName("msiexec")
        ' 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.
0
TASHAIKH
Asked:
TASHAIKH
  • 2
1 Solution
 
kalyan258Commented:
m8 I would like to suggest what I follow - this is the easiest and simplest of all.

Refer the tut in http://www.codeproject.com/dotnet/dotnetdeployment.asp

download teh files - follow the instructions - you are done - instead of those files - (.NET framework, ADO installer)

create a simple setup project in visual studio .net and use these techniques - you are be done.

This is what I followed for my application.
0
 
talhaaminCommented:
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.
0
 
talhaaminCommented:
Please close tashaikh account. Iam sorry i didn't know this thats why i made 2 accounts.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now