Installing database while setup

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shanthsp2002
    New Member
    • Apr 2006
    • 28

    #16
    Hey I got it

    To find the source path of my database files just i have used a small trick
    here first i srored the path to my database files in a string variable it contains all path except the drive name because we can't say in clint sys what is drive name of cd drive so i get this drive from source path

    Code:
     private string GetConfigFilePath(string fpath) 
    {
    	string filePath = "";
    	string dd = "";
    	string Resources=@"\application\databasefolder\";	
    	dd=sourcePath.Substring(0, 3);
    	string strConfigLoc = dd + Resources
    	string strTemp = System.IO.Path.GetDirectoryName(strConfigLoc).ToString();
     
    	filePath = strTemp+@"\";
    	EventLog.WriteEntry("filepath", filePath , EventLogEntryType.SuccessAudit);
    	return filePath;
     
    }
    Last edited by Niheel; Apr 15 '06, 06:00 AM.

    Comment

    • CaptainD
      New Member
      • Mar 2006
      • 135

      #17
      I like your solution. I was trying to find the equivilant to VB6's "App.Path" but was unable to locate it. What namespace is "SourcePath " under?

      Comment

      • shanthsp2002
        New Member
        • Apr 2006
        • 28

        #18
        Hi

        SourcePath is not from namespace. do one thing , in custom action editor

        |
        ----Install
        ..........|
        ...........---UrCustomAction. dll

        ----Commit
        ----RollBack
        ----Uninstall

        go to properties of that UrCustomAction. dll is what ever ur custom action file
        in that

        CustomActionDat a property is there

        enter following in to that property

        /SourceFolder="[SourceDir]\" /DestinationFold er="[TARGETDIR]\"


        here [SourceDir] is source folder of ur custom action dll


        njoy n all the best
        Last edited by shanthsp2002; Apr 18 '06, 05:09 AM.

        Comment

        • shanthsp2002
          New Member
          • Apr 2006
          • 28

          #19
          Hi qustion for u

          How to find werther the SqlExpress is installed on current machine or not


          i need this to install Sqlexpress on selection of client but i have to check first werther its alredy installed in sys

          Comment

          • shanthsp2002
            New Member
            • Apr 2006
            • 28

            #20
            I got it

            if u want just go through this link







            All the best friends

            regards
            Prashanth
            Last edited by shanthsp2002; Apr 19 '06, 06:26 AM.

            Comment

            • shanthsp2002
              New Member
              • Apr 2006
              • 28

              #21
              Hi friends , i am developing a setup and deployment project for our application here i have to include two other applications with our product installer, and they must be installed only when use selects them. can any body have any idea abt this

              just how to create nested installer. clear idea


              thank u

              Comment

              Working...