CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2001
    Posts
    160

    Storing Data in Windows 7

    I have an app worte several years ago in VB6 that writes to a database. I have had to modify it lately and install it on a new computer running Windows 7. My app reads the database path from an .ini file. The path is C:\ProgramData\My Folder. The database is stored in My Folder. I installed the app and it did write to this database in the specified path for about 1 hour after installation. Then I noticed that the app was still updating the data (visually evident in the application) but the database in the specified path was not updating. I did a search for .mdb files on the C drive. I found that the computer made a copy of the database and moved it to "C:\users\operator\appdata\local\virtualstore\programdata\myfolder" where operator is the user name.
    This will not work due to the fact that more than one user may use the application. This is why I put it where I did so it would be accessable for everyone, or so I thought.
    DOES ANYONE KNOW WHAT I CAN DO. I AM STUMPED. I know I can change the properties of the .exe file to run as an administrator. This will work but I would like to do it right instead of a work around. I have tried changing folder permissions on ProgramData folder but still no luck.
    Any help would be appreciated.

    thanks,

    Jason

  2. #2
    Join Date
    Apr 2009
    Posts
    394

    Re: Storing Data in Windows 7


  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Storing Data in Windows 7

    Delete everything, and change your installer to install the program AND data files into the \ProgramData folder, instead of \Program Files or \Program Files (x86) on Windows 7
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Sep 2001
    Posts
    160

    Re: Storing Data in Windows 7

    Thank you to everyone with a reply. I will wee what i can come up with.

  5. #5
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Storing Data in Windows 7

    Quote Originally Posted by theGhost
    I know I can change the properties of the .exe file to run as an administrator
    I would suggest you do this

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured