Windows 8 and 8.1 Forums

Phantom File when running VB6 program

  1. #1

    Posts : 1
    Windows 8.1

    Phantom File when running VB6 program

    Good day, my first visit here.

    I have a Lenovo laptop running Windows 8.1. I run a number of VB6 programs. One is an estimating system that makes use of .dat files. When I first install the program and the files, everything works fine.

    The problem comes when I 'over-write' a .dat file with a newer version, with some basic cost changes (the file updated on a different computer which contains VB6). As I 'paste' from a USB stick it asks if I want to over-write, which I obviously agree to.

    However, as I run the program, I still appear to be using data from the previous file! The latest update figures are ignored.

    To check this out further, I have even deleted (removed completely) the .dat file from the appropriate directory, but when running the program it still inputs data from the original file.

    This leads me to believe there must be another copy of the file open somewhere (hence the phantom!), possibly as a 'last used' reference.

    I have been on to the taskbar and ensured I have unchecked the two boxes about retaining files etc.

    Can anyone tell me what is going on: am I doing something wrong, is there a way of sorting this out?

    Help would be much appreciated.


      My System SpecsSystem Spec

  2. #2

    Posts : 2
    Windows XP, 7 and 8.1

    I realize this is a little late so you may have already resolved this issue.

    This sounds like a problem with where your .dat file is saved.
    I'm guessing you have it saved in the same folder as your VB6 program (under C:\Program Files....)
    The problem with doing this (since Windows Vista) is that Windows takes a virtual copy of the file and your VB6 program works with that. When you modify or delete the .dat file you aren't affecting the virtual copy which your application carries on using.

    This is not an issue just with Visual Basic 6 (VB6) programming, it applies to any application.

    How to fix this ? Ideally you would put your .dat file elsewhere. But this would mean modifying your VB6 app.

    Switching off UAC (User Account Control) would also fix this, but it isn't necessarily a good idea to do this.

    The 'phantom' virtual copy of the file will be saved somewhere like
    “C:\Users\<username>\AppData\Local\VirtualStore\Program Files\myapp\myfile.dat”
    (where myapp is your program name and myfile.dat is your .dat file and <username> is the user logon)

    So you could copy your .dat file to here every time (and permanently delete the one under C:\Program Files...)

    Another fix would be to have your VB6 application stored outside of C:\Program Files..., such as creating a new folder "C:\My applications".
      My System SpecsSystem Spec

Phantom File when running VB6 program
Related Threads
Hello, every time I start up my laptop this program starts running. I do not know what it is and can't figure out what it's called so I can't close it. I can see it running when I switch between tabs. Here is a screenshot of it in between of Chrome and my desktop: 44540 Does anybody know...
Hi I've installed Quicken 2004 on Windows 8.1 in compatibility mode for Windows XP 3 to run as administrator. Everything seems to work well. All my data appears to have been restored including Home Inventory. I can download bank data. Automatic backup works. I tested this by changing the system...
Ok, Now there is a lot to be said right now so bare with me. I'm going to start form the beginning. I had this problem where I would be presented with coloured screens and after 5 minuets on this screen I get my screens back but with coloured pixels on the screen and I cant seem to do anything at...
I updated my windows 8 to the newly launched 8.1 just today. I used to run a software named "Diet Odin" on my laptop but now it just doesnt start. Well, I would understand if it gave me some sort of error or compatibility issue, but it doesnt. The thing is, I start the software by double...
I have a rather irritating problem, which I don't recall having on Windows 7. Each time I run my backup program (SynchBack SE) I get the following message; "Do you want to allow the following program to make changes to this computer", which I always say 'Yes' to. Now, I understand this...
Okay i have windows 8 pro, my pc is very fast 4 gb ram dual core with very good graphics card, its a gaming pc. I installed windows 8 and i mainly dj on it, so i run some programs (traktor pro) and even after closing them windows starts being so slow and sticky, windows explorer stops...
I am trying to access my company desktop at home. The program runs on 32 bit instead of 64 bit. I was advised that there is a way to do this on Windows 8. Please help. thanks in advance.
Eight Forums Android App Eight Forums IOS App Follow us on Facebook