Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. setup project

setup project

Scheduled Pinned Locked Moved Visual Basic
databasequestioncsharpsql-server
9 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lisana
    wrote on last edited by
    #1

    I'm going to build the setup project for my app. but I have 3 steps to check for the target machine or server before install the app. 1. check framework in the target machine (if not, install the dotnetfx.exe) 2. check SQL Server, can be in the target machine or server (if not, install the MSDE in the target machine) 3. Ask for the Server name, user id, password, then check the database name XXX if exist? (if no, copy a database to the target sql server, if yes, ask for if want to overwrite) after these 3 steps are checked, then install my app. How can I do these in vb.net? any idea? one more thing, when the user input the server name, user id and password, this three value will send to the app. and use them to connect to the server. How can I do that? Thanks! Lisa

    D 1 Reply Last reply
    0
    • L Lisana

      I'm going to build the setup project for my app. but I have 3 steps to check for the target machine or server before install the app. 1. check framework in the target machine (if not, install the dotnetfx.exe) 2. check SQL Server, can be in the target machine or server (if not, install the MSDE in the target machine) 3. Ask for the Server name, user id, password, then check the database name XXX if exist? (if no, copy a database to the target sql server, if yes, ask for if want to overwrite) after these 3 steps are checked, then install my app. How can I do these in vb.net? any idea? one more thing, when the user input the server name, user id and password, this three value will send to the app. and use them to connect to the server. How can I do that? Thanks! Lisa

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Well, this one is easy, you can't create an installer application in VB.NET. If the .NET Framework isn't installed, you're VB.NET installer app won't even run in the first place. You'll have to use a non-managed language to do this, like Visual C++. There are samples around the 'Net that either demonstrate how to do this or are already written to do this and you just modify it and supply your componets to it. You can find more information in this article[^] by Davide Icardi. As for your server name, userID and password, you'll have to write a custom action for the .MSI installer (which can be done in VB.NET!) and put up a form asking for these things. Once you have them, you can use the came code you write into your application to check to see if the database exists and the credentials work, then store those values in the place where your application is going to look for them. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      L 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Well, this one is easy, you can't create an installer application in VB.NET. If the .NET Framework isn't installed, you're VB.NET installer app won't even run in the first place. You'll have to use a non-managed language to do this, like Visual C++. There are samples around the 'Net that either demonstrate how to do this or are already written to do this and you just modify it and supply your componets to it. You can find more information in this article[^] by Davide Icardi. As for your server name, userID and password, you'll have to write a custom action for the .MSI installer (which can be done in VB.NET!) and put up a form asking for these things. Once you have them, you can use the came code you write into your application to check to see if the database exists and the credentials work, then store those values in the place where your application is going to look for them. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        L Offline
        L Offline
        Lisana
        wrote on last edited by
        #3

        How to write a .MSI installer? Lisa

        D 1 Reply Last reply
        0
        • L Lisana

          How to write a .MSI installer? Lisa

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          You can start by adding a Setup project to your solution. Just right click your solution name (bold type) in the Solution Explorer and click "Add Project..." RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          L 1 Reply Last reply
          0
          • D Dave Kreskowiak

            You can start by adding a Setup project to your solution. Just right click your solution name (bold type) in the Solution Explorer and click "Add Project..." RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            L Offline
            L Offline
            Lisana
            wrote on last edited by
            #5

            hi, Dave, I have two project in my app now. one is for the database setup, it will be a small setup wizard, after the user setup the database, then I want to pass the three value to the other project. how can I do it? thanks! Lisa

            D 1 Reply Last reply
            0
            • L Lisana

              hi, Dave, I have two project in my app now. one is for the database setup, it will be a small setup wizard, after the user setup the database, then I want to pass the three value to the other project. how can I do it? thanks! Lisa

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              You don't. Run your application's setup first. It shouldn't need any external information to be provided in order to complete the install. Code your database setup to ask for the parameters, install the database, test those parameters, then just put the parameters where your application will expect them, whereever you chose. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              L 1 Reply Last reply
              0
              • D Dave Kreskowiak

                You don't. Run your application's setup first. It shouldn't need any external information to be provided in order to complete the install. Code your database setup to ask for the parameters, install the database, test those parameters, then just put the parameters where your application will expect them, whereever you chose. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                L Offline
                L Offline
                Lisana
                wrote on last edited by
                #7

                sorry..Dave, I still confuse the process... here is in my solution explorer: 3 projects: SetupWizard - Window application (for the copying a empty database to the target server and user provides the parameters) MainProject - Window application (this is the application will run in target machine, and need the parameters for the connection to sql from SetupWizard application) Setup - Setup Project (install the SetupWizard first, then install the MainProject) Is my project setup right? I still don't know how to pass the parameters from SetupWizard to MainProject.. Lisa

                D 1 Reply Last reply
                0
                • L Lisana

                  sorry..Dave, I still confuse the process... here is in my solution explorer: 3 projects: SetupWizard - Window application (for the copying a empty database to the target server and user provides the parameters) MainProject - Window application (this is the application will run in target machine, and need the parameters for the connection to sql from SetupWizard application) Setup - Setup Project (install the SetupWizard first, then install the MainProject) Is my project setup right? I still don't know how to pass the parameters from SetupWizard to MainProject.. Lisa

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  You don't pass the parameters between the any of these. The parameters get saved to the location where your MainProject application expects to find them so it knows how to get to the database your SetupWizard project created. Where does your MainProject expect to find the database parameters it needs to get to and login to the database? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                  L 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    You don't pass the parameters between the any of these. The parameters get saved to the location where your MainProject application expects to find them so it knows how to get to the database your SetupWizard project created. Where does your MainProject expect to find the database parameters it needs to get to and login to the database? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                    L Offline
                    L Offline
                    Lisana
                    wrote on last edited by
                    #9

                    Here is all I did for the parameters. In SetupWizard project, it has a module file called public.vb Module _public Public server, user, password, database As String End Module In my MainProject, it has a module file called PublicModule.vb Module PublicModule Public DataSource As String =database Public DataServer As String = server Public UserID As String = user Public UserPassword As String = password Public objConn As OleDbConnection = New _ OleDbConnection("Provider=SQLOLEDB;" & _ "Data Source=" & DataServer & ";Initial Catalog=" & DataSource & ";" & _ "User ID=" & UserID & ";Password=" & password & _ ";Auto Translate=True;Persist Security Info=False;" & _ "Workstation ID=" & DataServer & ";Use Encryption for Data=False;") end module in the PublicModule, I can't do this Public DataSource As String =database Public DataServer As String = server Public UserID As String = user Public UserPassword As String = password it doesn't sign value to it. the name is not declared. Logically, the way I'm doing should be wrong, it can't just pass the parameters in the publicModule, but I don't know any other ways to do it. do you have any idea for it? I know that would be so easy to you, but I'm very dumb of this, could you please help me out of this. I very appricate of it. Thank you very much. Lisa

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups