VB.NET Deployment - Checking for user-modified files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Juggler

    VB.NET Deployment - Checking for user-modified files

    Hi all

    I've written a program in VB.NET that allows the user to build quotes for installing shower enclosures. As part of the program, I've included a blank Access database. I've provided them with an interface where they can add their own clients to the database

    When the user upgrades to a newer version of my program, I don't want the installer to overwrite the Access database file with my blank one again. How can I tell VB.NET to check to see if the file has been modified, and if so, not to overwrite it

    Many thanks

    Juggler at(@) sonic dot(.) net
  • SStory

    #2
    Re: VB.NET Deployment - Checking for user-modified files

    Well, I assume you are upgrading using a setup in vb.net 2003?

    If so isn't there a property for the file whatever.mdb to not overwrite?

    Of course from within VB.NET you have the system.io.filei nfo class to get
    information on files... but that doesn't seem that it would do much good as
    far as setup goes.

    Check to see if you can't highlight the .MDB file in the setup and click
    properties and set to not overwrite. don't have the IDE open at present but
    that is where I would look.

    HTH,

    Shane

    "Juggler" <anonymous@disc ussions.microso ft.com> wrote in message
    news:FECA2F8F-B95D-4808-88DC-D40C1624AFA9@mi crosoft.com...[color=blue]
    > Hi all,
    >
    > I've written a program in VB.NET that allows the user to build quotes for[/color]
    installing shower enclosures. As part of the program, I've included a blank
    Access database. I've provided them with an interface where they can add
    their own clients to the database.[color=blue]
    >
    > When the user upgrades to a newer version of my program, I don't want the[/color]
    installer to overwrite the Access database file with my blank one again. How
    can I tell VB.NET to check to see if the file has been modified, and if so,
    not to overwrite it?[color=blue]
    >
    > Many thanks,
    >
    > Juggler at(@) sonic dot(.) net[/color]


    Comment

    • Juggler

      #3
      Re: VB.NET Deployment - Checking for user-modified files

      I'm using vb.net 2002

      When I go to the File System Editor, highlight the file and select properties, I have the option to adjust

      - Condition (seems to only check version/processor info on the computer being installed on
      - Exclude (blanket exclude from installation
      - Folder (where to install it
      - Hidden (is it a hidden file
      - PackageAs (not sure what this is for
      - Permenent (whether or not to leave it during uninstallation
      - ReadOnly (read only
      - SharedLegacyFil e (this might be it, but I don't really know what the help text is talking about
      - SourcePath (file location
      - System (is it a system file?
      - TargetName (name of file
      - Transitive (whether or not the installer should reevaluate the Condition property each installation
      - Vital (whether a file is vital for installation or not

      There must be an answer out there. It's like saving a user's preferences from version to version. Each time I release a new version of the program, I don't want the users to have to re-enter their info. I can work around the installation problem with preferences by using a text file for the user's preferences. When the program loads the splash screen, I check for the existance of the preferences text file. If it's not there, I can display a window to the user that asks for their preferences information (name, whether they want to print in color, etc.), and then write a text file

      Thanks for any help that can be provided

      Juggler (@)at sonic (.) ne

      ----- SStory wrote: ----

      Well, I assume you are upgrading using a setup in vb.net 2003

      If so isn't there a property for the file whatever.mdb to not overwrite

      Of course from within VB.NET you have the system.io.filei nfo class to ge
      information on files... but that doesn't seem that it would do much good a
      far as setup goes

      Check to see if you can't highlight the .MDB file in the setup and clic
      properties and set to not overwrite. don't have the IDE open at present bu
      that is where I would look

      HTH

      Shan

      "Juggler" <anonymous@disc ussions.microso ft.com> wrote in messag
      news:FECA2F8F-B95D-4808-88DC-D40C1624AFA9@mi crosoft.com..[color=blue]
      > Hi all[color=green]
      >> I've written a program in VB.NET that allows the user to build quotes fo[/color][/color]
      installing shower enclosures. As part of the program, I've included a blan
      Access database. I've provided them with an interface where they can ad
      their own clients to the database[color=blue][color=green]
      >> When the user upgrades to a newer version of my program, I don't want th[/color][/color]
      installer to overwrite the Access database file with my blank one again. Ho
      can I tell VB.NET to check to see if the file has been modified, and if so
      not to overwrite it[color=blue][color=green]
      >> Many thanks
      >> Juggler at(@) sonic dot(.) ne[/color][/color]



      Comment

      • Ot

        #4
        Re: VB.NET Deployment - Checking for user-modified files

        In a similar situation, I did not deliver the default data as part of the
        application, but instead built it from the application itself when it did
        not exist. That is, the application itself checks for data existing and
        builds the default template that way. You could include the default data
        as an embedded resource and create it where you want when you want.


        "Juggler" <anonymous@disc ussions.microso ft.com> wrote in message
        news:4FEB069A-B662-4543-9150-7ECFDBAE3157@mi crosoft.com...[color=blue]
        > I'm using vb.net 2002.
        >
        > When I go to the File System Editor, highlight the file and select[/color]
        properties, I have the option to adjust:[color=blue]
        >
        > - Condition (seems to only check version/processor info on the computer[/color]
        being installed on)[color=blue]
        > - Exclude (blanket exclude from installation)
        > - Folder (where to install it)
        > - Hidden (is it a hidden file)
        > - PackageAs (not sure what this is for)
        > - Permenent (whether or not to leave it during uninstallation)
        > - ReadOnly (read only)
        > - SharedLegacyFil e (this might be it, but I don't really know what the[/color]
        help text is talking about)[color=blue]
        > - SourcePath (file location)
        > - System (is it a system file?)
        > - TargetName (name of file)
        > - Transitive (whether or not the installer should reevaluate the[/color]
        Condition property each installation)[color=blue]
        > - Vital (whether a file is vital for installation or not)
        >
        > There must be an answer out there. It's like saving a user's preferences[/color]
        from version to version. Each time I release a new version of the program,
        I don't want the users to have to re-enter their info. I can work around
        the installation problem with preferences by using a text file for the
        user's preferences. When the program loads the splash screen, I check for
        the existance of the preferences text file. If it's not there, I can
        display a window to the user that asks for their preferences information
        (name, whether they want to print in color, etc.), and then write a text
        file.[color=blue]
        >
        > Thanks for any help that can be provided!
        >
        > Juggler (@)at sonic (.) net
        >
        > ----- SStory wrote: -----
        >
        > Well, I assume you are upgrading using a setup in vb.net 2003?
        >
        > If so isn't there a property for the file whatever.mdb to not[/color]
        overwrite?[color=blue]
        >
        > Of course from within VB.NET you have the system.io.filei nfo class[/color]
        to get[color=blue]
        > information on files... but that doesn't seem that it would do much[/color]
        good as[color=blue]
        > far as setup goes.
        >
        > Check to see if you can't highlight the .MDB file in the setup and[/color]
        click[color=blue]
        > properties and set to not overwrite. don't have the IDE open at[/color]
        present but[color=blue]
        > that is where I would look.
        >
        > HTH,
        >
        > Shane
        >
        > "Juggler" <anonymous@disc ussions.microso ft.com> wrote in message
        > news:FECA2F8F-B95D-4808-88DC-D40C1624AFA9@mi crosoft.com...[color=green]
        > > Hi all,[color=darkred]
        > >> I've written a program in VB.NET that allows the user to build[/color][/color][/color]
        quotes for[color=blue]
        > installing shower enclosures. As part of the program, I've included[/color]
        a blank[color=blue]
        > Access database. I've provided them with an interface where they can[/color]
        add[color=blue]
        > their own clients to the database.[color=green][color=darkred]
        > >> When the user upgrades to a newer version of my program, I don't[/color][/color][/color]
        want the[color=blue]
        > installer to overwrite the Access database file with my blank one[/color]
        again. How[color=blue]
        > can I tell VB.NET to check to see if the file has been modified, and[/color]
        if so,[color=blue]
        > not to overwrite it?[color=green][color=darkred]
        > >> Many thanks,
        > >> Juggler at(@) sonic dot(.) net[/color][/color]
        >
        >
        >[/color]


        Comment

        • SStory

          #5
          Re: VB.NET Deployment - Checking for user-modified files

          I like this idea best.

          Throw it on the CD... Require them to insert CD first time or whatever and
          your program checks to see if it is there using
          the fileinfo class and then if not copies it from CD to disk..

          Seems the easiest although setup may have a way.. I don't know

          Shane

          "Ot" <uraza@tds.inva lid (use net)> wrote in message
          news:%23xfXvGw% 23DHA.2308@tk2m sftngp13.phx.gb l...[color=blue]
          > In a similar situation, I did not deliver the default data as part of the
          > application, but instead built it from the application itself when it did
          > not exist. That is, the application itself checks for data existing and
          > builds the default template that way. You could include the default data
          > as an embedded resource and create it where you want when you want.
          >
          >
          > "Juggler" <anonymous@disc ussions.microso ft.com> wrote in message
          > news:4FEB069A-B662-4543-9150-7ECFDBAE3157@mi crosoft.com...[color=green]
          > > I'm using vb.net 2002.
          > >
          > > When I go to the File System Editor, highlight the file and select[/color]
          > properties, I have the option to adjust:[color=green]
          > >
          > > - Condition (seems to only check version/processor info on the computer[/color]
          > being installed on)[color=green]
          > > - Exclude (blanket exclude from installation)
          > > - Folder (where to install it)
          > > - Hidden (is it a hidden file)
          > > - PackageAs (not sure what this is for)
          > > - Permenent (whether or not to leave it during uninstallation)
          > > - ReadOnly (read only)
          > > - SharedLegacyFil e (this might be it, but I don't really know what the[/color]
          > help text is talking about)[color=green]
          > > - SourcePath (file location)
          > > - System (is it a system file?)
          > > - TargetName (name of file)
          > > - Transitive (whether or not the installer should reevaluate the[/color]
          > Condition property each installation)[color=green]
          > > - Vital (whether a file is vital for installation or not)
          > >
          > > There must be an answer out there. It's like saving a user's preferences[/color]
          > from version to version. Each time I release a new version of the program,
          > I don't want the users to have to re-enter their info. I can work around
          > the installation problem with preferences by using a text file for the
          > user's preferences. When the program loads the splash screen, I check for
          > the existance of the preferences text file. If it's not there, I can
          > display a window to the user that asks for their preferences information
          > (name, whether they want to print in color, etc.), and then write a text
          > file.[color=green]
          > >
          > > Thanks for any help that can be provided!
          > >
          > > Juggler (@)at sonic (.) net
          > >
          > > ----- SStory wrote: -----
          > >
          > > Well, I assume you are upgrading using a setup in vb.net 2003?
          > >
          > > If so isn't there a property for the file whatever.mdb to not[/color]
          > overwrite?[color=green]
          > >
          > > Of course from within VB.NET you have the system.io.filei nfo class[/color]
          > to get[color=green]
          > > information on files... but that doesn't seem that it would do much[/color]
          > good as[color=green]
          > > far as setup goes.
          > >
          > > Check to see if you can't highlight the .MDB file in the setup and[/color]
          > click[color=green]
          > > properties and set to not overwrite. don't have the IDE open at[/color]
          > present but[color=green]
          > > that is where I would look.
          > >
          > > HTH,
          > >
          > > Shane
          > >
          > > "Juggler" <anonymous@disc ussions.microso ft.com> wrote in message
          > > news:FECA2F8F-B95D-4808-88DC-D40C1624AFA9@mi crosoft.com...[color=darkred]
          > > > Hi all,
          > > >> I've written a program in VB.NET that allows the user to build[/color][/color]
          > quotes for[color=green]
          > > installing shower enclosures. As part of the program, I've included[/color]
          > a blank[color=green]
          > > Access database. I've provided them with an interface where they[/color][/color]
          can[color=blue]
          > add[color=green]
          > > their own clients to the database.[color=darkred]
          > > >> When the user upgrades to a newer version of my program, I don't[/color][/color]
          > want the[color=green]
          > > installer to overwrite the Access database file with my blank one[/color]
          > again. How[color=green]
          > > can I tell VB.NET to check to see if the file has been modified,[/color][/color]
          and[color=blue]
          > if so,[color=green]
          > > not to overwrite it?[color=darkred]
          > > >> Many thanks,
          > > >> Juggler at(@) sonic dot(.) net[/color]
          > >
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Juggler

            #6
            Re: VB.NET Deployment - Checking for user-modified files

            I think I'm going to try including the .mdb file with the program, but in a sub-folder. The program will check to see if the .mdb file exists where it should during normal operation, and if it isn't there (i.e. they just installed the program), it will copy the .mdb file from the sub-directory and put it in the proper place before it calls it for the first time

            Hopefully, it will all work out. It still seems silly that there isn't a simple setting in vb.net that checks whether or not a file has been modified since the last version update, and to leave it alone if the user has modified it.

            Juggle

            ----- SStory wrote: ----

            I like this idea best

            Throw it on the CD... Require them to insert CD first time or whatever an
            your program checks to see if it is there usin
            the fileinfo class and then if not copies it from CD to disk.

            Seems the easiest although setup may have a way.. I don't kno

            Shan

            "Ot" <uraza@tds.inva lid (use net)> wrote in messag
            news:%23xfXvGw% 23DHA.2308@tk2m sftngp13.phx.gb l..[color=blue]
            > In a similar situation, I did not deliver the default data as part of th
            > application, but instead built it from the application itself when it di
            > not exist. That is, the application itself checks for data existing an
            > builds the default template that way. You could include the default dat
            > as an embedded resource and create it where you want when you want[color=green][color=darkred]
            >>> "Juggler" <anonymous@disc ussions.microso ft.com> wrote in messag[/color][/color]
            > news:4FEB069A-B662-4543-9150-7ECFDBAE3157@mi crosoft.com..[color=green]
            >> I'm using vb.net 2002[color=darkred]
            >>>> When I go to the File System Editor, highlight the file and selec[/color][/color]
            > properties, I have the option to adjust[color=green][color=darkred]
            >>>> - Condition (seems to only check version/processor info on the compute[/color][/color]
            > being installed on[color=green]
            >> - Exclude (blanket exclude from installation
            >> - Folder (where to install it
            >> - Hidden (is it a hidden file
            >> - PackageAs (not sure what this is for
            >> - Permenent (whether or not to leave it during uninstallation
            >> - ReadOnly (read only
            >> - SharedLegacyFil e (this might be it, but I don't really know what th[/color]
            > help text is talking about[color=green]
            >> - SourcePath (file location
            >> - System (is it a system file?
            >> - TargetName (name of file
            >> - Transitive (whether or not the installer should reevaluate th[/color]
            > Condition property each installation[color=green]
            >> - Vital (whether a file is vital for installation or not[color=darkred]
            >>>> There must be an answer out there. It's like saving a user's preference[/color][/color]
            > from version to version. Each time I release a new version of the program
            > I don't want the users to have to re-enter their info. I can work aroun
            > the installation problem with preferences by using a text file for th
            > user's preferences. When the program loads the splash screen, I check fo
            > the existance of the preferences text file. If it's not there, I ca
            > display a window to the user that asks for their preferences informatio
            > (name, whether they want to print in color, etc.), and then write a tex
            > file[color=green][color=darkred]
            >>>> Thanks for any help that can be provided
            >>>> Juggler (@)at sonic (.) ne
            >>>> ----- SStory wrote: ----
            >>>> Well, I assume you are upgrading using a setup in vb.net 2003
            >>>> If so isn't there a property for the file whatever.mdb to no[/color][/color]
            > overwrite[color=green][color=darkred]
            >>>> Of course from within VB.NET you have the system.io.filei nfo clas[/color][/color]
            > to ge[color=green]
            >> information on files... but that doesn't seem that it would do muc[/color]
            > good a[color=green]
            >> far as setup goes[color=darkred]
            >>>> Check to see if you can't highlight the .MDB file in the setup an[/color][/color]
            > clic[color=green]
            >> properties and set to not overwrite. don't have the IDE open a[/color]
            > present bu[color=green]
            >> that is where I would look[color=darkred]
            >>>> HTH
            >>>> Shan
            >>>> "Juggler" <anonymous@disc ussions.microso ft.com> wrote in messag[/color]
            >> news:FECA2F8F-B95D-4808-88DC-D40C1624AFA9@mi crosoft.com...[color=darkred]
            >>> Hi all,
            >>>> I've written a program in VB.NET that allows the user to build[/color][/color]
            > quotes for[color=green]
            >> installing shower enclosures. As part of the program, I've included[/color]
            > a blank[color=green]
            >> Access database. I've provided them with an interface where they[/color][/color]
            can[color=blue]
            > add[color=green]
            >> their own clients to the database.[color=darkred]
            >>>> When the user upgrades to a newer version of my program, I don't[/color][/color]
            > want the[color=green]
            >> installer to overwrite the Access database file with my blank one[/color]
            > again. How[color=green]
            >> can I tell VB.NET to check to see if the file has been modified,[/color][/color]
            and[color=blue]
            > if so,[color=green]
            >> not to overwrite it?[color=darkred]
            >>>> Many thanks,
            >>>> Juggler at(@) sonic dot(.) net
            >>>>>>>>[/color][/color][/color]

            Comment

            • SStory

              #7
              Re: VB.NET Deployment - Checking for user-modified files

              There may be... I haven't been using it enough to do formal updates yet.
              Simple updates are send them the new exe and they copy over the old one.
              Pretty neat, but...

              Maybe if there is a way someone at Microsoft or some other guru will respond
              and tell us both.
              Sorry I don't know more.

              Shane

              "Juggler" <anonymous@disc ussions.microso ft.com> wrote in message
              news:618533F6-E898-4503-B1C0-AE781942C35A@mi crosoft.com...[color=blue]
              > I think I'm going to try including the .mdb file with the program, but in[/color]
              a sub-folder. The program will check to see if the .mdb file exists where it
              should during normal operation, and if it isn't there (i.e. they just
              installed the program), it will copy the .mdb file from the sub-directory
              and put it in the proper place before it calls it for the first time.[color=blue]
              >
              > Hopefully, it will all work out. It still seems silly that there isn't a[/color]
              simple setting in vb.net that checks whether or not a file has been modified
              since the last version update, and to leave it alone if the user has
              modified it.[color=blue]
              >
              > Juggler
              >
              > ----- SStory wrote: -----
              >
              > I like this idea best.
              >
              > Throw it on the CD... Require them to insert CD first time or[/color]
              whatever and[color=blue]
              > your program checks to see if it is there using
              > the fileinfo class and then if not copies it from CD to disk..
              >
              > Seems the easiest although setup may have a way.. I don't know
              >
              > Shane
              >
              > "Ot" <uraza@tds.inva lid (use net)> wrote in message
              > news:%23xfXvGw% 23DHA.2308@tk2m sftngp13.phx.gb l...[color=green]
              > > In a similar situation, I did not deliver the default data as part[/color][/color]
              of the[color=blue][color=green]
              > > application, but instead built it from the application itself when[/color][/color]
              it did[color=blue][color=green]
              > > not exist. That is, the application itself checks for data[/color][/color]
              existing and[color=blue][color=green]
              > > builds the default template that way. You could include the[/color][/color]
              default data[color=blue][color=green]
              > > as an embedded resource and create it where you want when you want.[color=darkred]
              > >>> "Juggler" <anonymous@disc ussions.microso ft.com> wrote in message[/color]
              > > news:4FEB069A-B662-4543-9150-7ECFDBAE3157@mi crosoft.com...[color=darkred]
              > >> I'm using vb.net 2002.
              > >>>> When I go to the File System Editor, highlight the file and[/color][/color][/color]
              select[color=blue][color=green]
              > > properties, I have the option to adjust:[color=darkred]
              > >>>> - Condition (seems to only check version/processor info on the[/color][/color][/color]
              computer[color=blue][color=green]
              > > being installed on)[color=darkred]
              > >> - Exclude (blanket exclude from installation)
              > >> - Folder (where to install it)
              > >> - Hidden (is it a hidden file)
              > >> - PackageAs (not sure what this is for)
              > >> - Permenent (whether or not to leave it during uninstallation)
              > >> - ReadOnly (read only)
              > >> - SharedLegacyFil e (this might be it, but I don't really know what[/color][/color][/color]
              the[color=blue][color=green]
              > > help text is talking about)[color=darkred]
              > >> - SourcePath (file location)
              > >> - System (is it a system file?)
              > >> - TargetName (name of file)
              > >> - Transitive (whether or not the installer should reevaluate the[/color]
              > > Condition property each installation)[color=darkred]
              > >> - Vital (whether a file is vital for installation or not)
              > >>>> There must be an answer out there. It's like saving a user's[/color][/color][/color]
              preferences[color=blue][color=green]
              > > from version to version. Each time I release a new version of the[/color][/color]
              program,[color=blue][color=green]
              > > I don't want the users to have to re-enter their info. I can work[/color][/color]
              around[color=blue][color=green]
              > > the installation problem with preferences by using a text file for[/color][/color]
              the[color=blue][color=green]
              > > user's preferences. When the program loads the splash screen, I[/color][/color]
              check for[color=blue][color=green]
              > > the existance of the preferences text file. If it's not there, I[/color][/color]
              can[color=blue][color=green]
              > > display a window to the user that asks for their preferences[/color][/color]
              information[color=blue][color=green]
              > > (name, whether they want to print in color, etc.), and then write a[/color][/color]
              text[color=blue][color=green]
              > > file.[color=darkred]
              > >>>> Thanks for any help that can be provided!
              > >>>> Juggler (@)at sonic (.) net
              > >>>> ----- SStory wrote: -----
              > >>>> Well, I assume you are upgrading using a setup in vb.net[/color][/color][/color]
              2003?[color=blue][color=green][color=darkred]
              > >>>> If so isn't there a property for the file whatever.mdb to[/color][/color][/color]
              not[color=blue][color=green]
              > > overwrite?[color=darkred]
              > >>>> Of course from within VB.NET you have the[/color][/color][/color]
              system.io.filei nfo class[color=blue][color=green]
              > > to get[color=darkred]
              > >> information on files... but that doesn't seem that it would[/color][/color][/color]
              do much[color=blue][color=green]
              > > good as[color=darkred]
              > >> far as setup goes.
              > >>>> Check to see if you can't highlight the .MDB file in the[/color][/color][/color]
              setup and[color=blue][color=green]
              > > click[color=darkred]
              > >> properties and set to not overwrite. don't have the IDE open[/color][/color][/color]
              at[color=blue][color=green]
              > > present but[color=darkred]
              > >> that is where I would look.
              > >>>> HTH,
              > >>>> Shane
              > >>>> "Juggler" <anonymous@disc ussions.microso ft.com> wrote in[/color][/color][/color]
              message[color=blue][color=green][color=darkred]
              > >> news:FECA2F8F-B95D-4808-88DC-D40C1624AFA9@mi crosoft.com...
              > >>> Hi all,
              > >>>> I've written a program in VB.NET that allows the user to build[/color]
              > > quotes for[color=darkred]
              > >> installing shower enclosures. As part of the program, I've[/color][/color][/color]
              included[color=blue][color=green]
              > > a blank[color=darkred]
              > >> Access database. I've provided them with an interface where[/color][/color][/color]
              they[color=blue]
              > can[color=green]
              > > add[color=darkred]
              > >> their own clients to the database.
              > >>>> When the user upgrades to a newer version of my program, I don't[/color]
              > > want the[color=darkred]
              > >> installer to overwrite the Access database file with my blank[/color][/color][/color]
              one[color=blue][color=green]
              > > again. How[color=darkred]
              > >> can I tell VB.NET to check to see if the file has been[/color][/color][/color]
              modified,[color=blue]
              > and[color=green]
              > > if so,[color=darkred]
              > >> not to overwrite it?
              > >>>> Many thanks,
              > >>>> Juggler at(@) sonic dot(.) net
              > >>>>>>>>[/color][/color][/color]


              Comment

              Working...