?
Solved

MSDE installation problem using VB.net installer package

Posted on 2005-03-04
7
Medium Priority
?
629 Views
Last Modified: 2012-06-27
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
Comment
Question by:TASHAIKH
[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
7 Comments
 
LVL 2

Accepted Solution

by:
kalyan258 earned 200 total points
ID: 13466552
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
 
LVL 2

Expert Comment

by:talhaamin
ID: 13796312
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
 
LVL 2

Expert Comment

by:talhaamin
ID: 13821413
Please close tashaikh account. Iam sorry i didn't know this thats why i made 2 accounts.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

752 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