Lost text files from VB6 Diary program on a Windows 7 machine


  1. Posts : 7
    Windows 7 Home Premium 64 bit
       #1

    Lost text files from VB6 Diary program on a Windows 7 machine


    I wrote a Diary program for my wife using VB6 on an XP machine. The program was written to save the text files in a Folder under the installed Folder ex: Diary2007\Documents. This worked fine in XP. I have installed the file on a Windows 7 machine. Everything worked fine as far as the program goes. Unfortunately the install did not create the Document folder under the Diary2007 folder. Since then the hard drive crashed but I was able to get it running enough to pull files off of it. I have searched the entire drive for the folder Documents containing the txt files from the program. If I go to the diary program I can still access all of the text files from the program. I have changed the settings to show all hidden files and folders. I did find a folder called Documents but it was locked and I couldn't open it or access it. My wife has 10 years of her diary in there and I don't want to lose them or I'm dead meat!!!

    Any help on this matter?? When I set this computer up I gave her admin rights but that doesn't seem to matter. Once I get those files off the hard drive then I can do a security format on it and start over!!
    Last edited by johntech2004; 15 May 2015 at 03:28.
      My Computer


  2. Posts : 5,092
    Windows 7 32 bit
       #2

    What happened to the hard drive from the XP machine? I don't understand how you don't have a source for the files unless you networked them over?
      My Computer


  3. Posts : 7
    Windows 7 Home Premium 64 bit
    Thread Starter
       #3

    [QUOTE=MilesAhead;3066711]What happened to the hard drive from the XP machine? I don't understand how you don't have a source for the files unless you networked them over?[/QUOT

    The hard drive has been converted over to a windows 7. I still have all the source files for my diary program. The problem is the diary program has been running fine on windows 7 but I just don't know where it is storing my text files now. When I was running XP it created a folder inside the Diary2007 folder called Documents. When I installed the program on Windows 7 I have no idea where it is storing the files except I found a hidden folder with the name Documents. It is locked and I don't have access to it to see if the text files are stored in there. I have searched the entire hard drive for .txt file extensions and nothing matches any of the text files generated from my program. Yet I can still access them from within the Diary program. I have changed the settings in windows folders to show all hidden folders. That is how I found the Documents folder but it is locked and I can't get access to it.
      My Computer


  4. Posts : 2,465
    Windows 7 Ultimate x64
       #4

    Is the program installed under program files folder by any chance?
    If so, most likely the problem is that your files are being virtualized away due to an access restriction.

    Have a look here for a great explanation of the underlying issue:
    https://technet.microsoft.com/es-ar/...ac(en-us).aspx

    And a quick and dirty article about the same:
    Tales of Application Compatibility Weirdness

    My guess is that your program is trying to save to program files, which is of course forbidden to standard users. UAC Virtualization comes in (in order to provide compatibility to poorly written older programs) and silently redirects the write to the user profile instead where everyone has access to his own files. Windows does it but tells the application it succeeded but actually wrote the file elsewhere.

    So, quick and dirty answer to the problem (if I'm guessing correctly of course ), your files are in c:\users\<your user name>\appdata\local\virtualstore\program files\<whatever folder your program writes to>.
      My Computer


  5. Posts : 5,092
    Windows 7 32 bit
       #5

    If your wife is the only user on the machine you can get away from the redirection by using the Take Ownership shortcut

    Please take note of the warnings when using it. It is ok to take ownership of Program Files and Program Files (x86) but taking ownership of all of C: or the Windows folder messes things up.

    Many programs installed in Program Files expect to be able to write to their own install folder. By Taking Ownership they can without being Run As Administrator.
      My Computer


  6. Posts : 7
    Windows 7 Home Premium 64 bit
    Thread Starter
       #6

    Thanks Guys for the explanations. I will check out the information provided and hopefully be able to extract the files.

    John
      My Computer


  7. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #7

    If the folder is locked then ask your wife for the password to her Diary.

    People who wright a diary don't want others to read it so it just might be password protected.
      My Computer


  8. Posts : 7
    Windows 7 Home Premium 64 bit
    Thread Starter
       #8

    Alejandro85 said:
    Is the program installed under program files folder by any chance?
    If so, most likely the problem is that your files are being virtualized away due to an access restriction.

    Have a look here for a great explanation of the underlying issue:
    https://technet.microsoft.com/es-ar/...ac(en-us).aspx

    And a quick and dirty article about the same:
    Tales of Application Compatibility Weirdness

    My guess is that your program is trying to save to program files, which is of course forbidden to standard users. UAC Virtualization comes in (in order to provide compatibility to poorly written older programs) and silently redirects the write to the user profile instead where everyone has access to his own files. Windows does it but tells the application it succeeded but actually wrote the file elsewhere.

    So, quick and dirty answer to the problem (if I'm guessing correctly of course ), your files are in c:\users\<your user name>\appdata\local\virtualstore\program files\<whatever folder your program writes to>.
    THANK YOU Alejandro85 !!!

    I went to the directory as you suggested and ALL the Diary files were there!! You are a life saver. So Now I need to go back and edit my Diary program so it will save to the correct directory.
    Many, many thanks !!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:17.
Find Us