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
  1. Home
  2. General Programming
  3. C#
  4. How to maintain file path in installer..?

How to maintain file path in installer..?

Scheduled Pinned Locked Moved C#
csharpquestiondatabasesysadmintutorial
5 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.
  • P Offline
    P Offline
    Pankaj Joshi
    wrote on last edited by
    #1

    Hello experts, I made a desktop application using C#.NET 2005 using MS-ACCESS as a back-end, application is working fine. I also make a setup using .NET setup and deployment project. When I make the installer I also add the database file with EXE and DLL's suppose the database location is C:\MyProj\test\abc.mdb Now v1.0 is released. And I start working on new version, In that along with the code there are few database changes are also applied. I make separate folder for each version, Now one of my client is need some amendments in v1.0, but when I going to make installer it will take old database file. ..? Actually in .net setup and deployment project the external files(Text, Database etc.) are added with full path information. I want to make is dynamic I.e. I want to add files of same folder. So v1.0 is having old database and other files and v1.1 is having new database file. How Can I achive that...? :confused:

    Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...

    S 1 Reply Last reply
    0
    • P Pankaj Joshi

      Hello experts, I made a desktop application using C#.NET 2005 using MS-ACCESS as a back-end, application is working fine. I also make a setup using .NET setup and deployment project. When I make the installer I also add the database file with EXE and DLL's suppose the database location is C:\MyProj\test\abc.mdb Now v1.0 is released. And I start working on new version, In that along with the code there are few database changes are also applied. I make separate folder for each version, Now one of my client is need some amendments in v1.0, but when I going to make installer it will take old database file. ..? Actually in .net setup and deployment project the external files(Text, Database etc.) are added with full path information. I want to make is dynamic I.e. I want to add files of same folder. So v1.0 is having old database and other files and v1.1 is having new database file. How Can I achive that...? :confused:

      Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...

      S Offline
      S Offline
      sujithkumarsl
      wrote on last edited by
      #2

      actually what is the issue now, anyway you can specify the database name before taking the exe. better don't put db along with exe, make a separate folder and keep the database there. when I going to make installer it will take old database file. ..?..... you can specify the database which you need.

      My small attempt...

      P 1 Reply Last reply
      0
      • S sujithkumarsl

        actually what is the issue now, anyway you can specify the database name before taking the exe. better don't put db along with exe, make a separate folder and keep the database there. when I going to make installer it will take old database file. ..?..... you can specify the database which you need.

        My small attempt...

        P Offline
        P Offline
        Pankaj Joshi
        wrote on last edited by
        #3

        Thanks for your reply... The issue is: Suppose My project is placed in C:\MyProject\v1.0 And Database is placed at C:\MyProject\v1.0\Database\Mydata.mdb. Now I make setup for that then it will take database from "C:\MyProject\v1.0\Database\Mydata.mdb" Ok...? Now I make a new version of application then my project location is C:\MyProject\v1.1 And database location became C:\MyProject\v1.1\Database\Mydata.mdb. ... true? When I make the installer for v1.1 it will receive the database file from the "C:\MyProject\v1.0\Database\Mydata.mdb". But I want to take the file from ""C:\MyProject\v1.1\Database\Mydata.mdb" . For solve this problem I have to change the location of file in setup project right...? But I have more than 20 files (XML, Text files etc.) including database file. I have to change them also. Suppose I move to v1.2 then I have to repeat the same things again (Update the files location) What I want...? I want a setting that will take database and other files from the current working directory. I.e "C:\MyProject\v1.0\Database\Mydata.mdb" or "C:\MyProject\v1.1\Database\Mydata.mdb" or "C:\MyProject\v1.2\Database\Mydata.mdb" whatever version I build. How to achieve that...?:confused:

        Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...

        S 1 Reply Last reply
        0
        • P Pankaj Joshi

          Thanks for your reply... The issue is: Suppose My project is placed in C:\MyProject\v1.0 And Database is placed at C:\MyProject\v1.0\Database\Mydata.mdb. Now I make setup for that then it will take database from "C:\MyProject\v1.0\Database\Mydata.mdb" Ok...? Now I make a new version of application then my project location is C:\MyProject\v1.1 And database location became C:\MyProject\v1.1\Database\Mydata.mdb. ... true? When I make the installer for v1.1 it will receive the database file from the "C:\MyProject\v1.0\Database\Mydata.mdb". But I want to take the file from ""C:\MyProject\v1.1\Database\Mydata.mdb" . For solve this problem I have to change the location of file in setup project right...? But I have more than 20 files (XML, Text files etc.) including database file. I have to change them also. Suppose I move to v1.2 then I have to repeat the same things again (Update the files location) What I want...? I want a setting that will take database and other files from the current working directory. I.e "C:\MyProject\v1.0\Database\Mydata.mdb" or "C:\MyProject\v1.1\Database\Mydata.mdb" or "C:\MyProject\v1.2\Database\Mydata.mdb" whatever version I build. How to achieve that...?:confused:

          Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...

          S Offline
          S Offline
          sujithkumarsl
          wrote on last edited by
          #4

          When I make the installer for v1.1 it will receive the database file from the "C:\MyProject\v1.0\Database\Mydata.mdb". But I want to take the file from ""C:\MyProject\v1.1\Database\Mydata.mdb" . hw it happen? here v1.0 and v1.1 aer 2 different folders right?

          My small attempt...

          P 1 Reply Last reply
          0
          • S sujithkumarsl

            When I make the installer for v1.1 it will receive the database file from the "C:\MyProject\v1.0\Database\Mydata.mdb". But I want to take the file from ""C:\MyProject\v1.1\Database\Mydata.mdb" . hw it happen? here v1.0 and v1.1 aer 2 different folders right?

            My small attempt...

            P Offline
            P Offline
            Pankaj Joshi
            wrote on last edited by
            #5

            You can also try this yourself.... :wtf: This is happening because .NET setup project used the hard coded path. I have to change it in each release. How can I make it dynamic...? X|

            Regards Pankaj Joshi If you want to shape your dreams into reality, please wake-up...

            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