Maybe the problem is related to the whitespace in the name "Program Files"? Check if the same happens if you store the application inside a "Some Directory" folder (containing a space as well).
Maybe the problem is related to the whitespace in the name "Program Files"? Check if the same happens if you store the application inside a "Some Directory" folder (containing a space as well).
wysota: I don't think this is related, as other vista users (those who run with their administrator account, probably) reported no problem. Others who had problems installing into "Program Files" reported success when installing under "My Documents".
An application of mine had the same problem about using the VirtualStore, because it asked, on uninstallation, if the user would like to keep his database info. If it was running on Vista and the user selected "No", the Program Files copy was erased and the VirtualStore one was kept, what resulted, on further installations, in a "virtually restored" database, even if the original one was a brand new database.
One intermediary solution was to use a manifest file with the fields you showed. The actual solution is to save the database at the user folder, which, by the way, enables using one database per user.
Well, unfortunately the manifest file thing did not work.Maybe I did something wrong though. My manifest file content is as follows:
Qt Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="tagainijisho" type="win32"/> <description>A free Japanese dictionary and study assistant</description> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> </assembly>To copy to clipboard, switch view to plain text mode
To include it, I just added the following line into the .rc file:
Qt Code:
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "tagainijisho.exe.manifest"To copy to clipboard, switch view to plain text mode
Which is processed by windres through qmake as my project file includes this line:
Everything is processed by mingw32 under Linux (cross-compilation environment).
The RC file also includes the program icon which is visible, so I think it is correctly used here. But maybe I did something wrong here. Can windows experts give me some comments?
I think this is clearly not the solution here. These databases are read-only - no user is ever going to change them, so there is no reason for them to have their own copy. Moreover they are rather large (around 100Mb total). The user also has his settings stored into a private database, which is stored in the directory returned by QDesktopServices::storageLocation(QDesktopServices :: DataLocation). Here things are working perfectly, as the storage is done in the user profile and Vista does not abusively get into the way.
I really don't know whats going wrong with your app. It should be able to see and even write (on a virtually stored copy) at the database file. You could give a try to changing
toQt Code:
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>To copy to clipboard, switch view to plain text mode
And test if it works fine. But this a weird thing to do. I can't be of more help on just trying to figure things out... But I have a Vista test environment and, if your project isn't a proprietary software (or if it is and you trust me (I know you don't have reasons to do so, but...)), you could send it to me, so i could try to figure out what's wrong. =]Qt Code:
<requestedExecutionLevel level="requireAdministrator" />To copy to clipboard, switch view to plain text mode
Cheers,
tinsukE
Yeah, I feel like maybe something else is broken, but as the program works perfectly in XP I see no other culprit than the virtualization mechanism...
It's nothing secret - my project is open source and available at https://launchpad.net/tagaini-jisho .
However, I'm using scons on top of qmake to build it, and the build process is not feasible on Windows yet (I know, a Windows program that does not compile on Windows, what a weird thing to do!). One of my users agreed to help me figuring this out by running special binaries and sending me the output, so I guess I can do it this way. Thanks anyway for proposing to help - I really appreciate it.
I will keep you informed if I can track this down.
It's most definitely the virtualization system. I spent considerable pains dealing with it on a previous project. Vista is quite the adversary when trying to do things that it's been designed to discourage (like a centralized database for all users).
Software Engineer
This could be Sqlite creating (at least attempting to) temporary files in the same directory as the database you are opening. Rollback and master journal files are possibilities.
http://www.sqlite.org/tempfiles.html
This is another possibility, indeed. In that case, I'd be in bigger trouble than expected, since these temporary files are necessary.
But on the other hand, I kind of doubt this: on other platforms, the directory where the databases are contained is not writeable neither, and no problem occur. The real problem seems to be Vista returning a file descriptor that do not corresponds to the requested file.
Hello everyone,
Just a follow-up to explain how I solved this problem. After doing some trial-and-error, I realized that the files installed in Program Files had read-write access. Therefore, upon opening these files Vista guessed I could write them and therefore made a copy into the virtual store. The solution was pretty straightforward: ensure the files have read-only attribute when they are installed. I just witnessed that with this attribute, virtual store files are not created anymore.
Thanks to you all for the pointers and tips. I'm really glad this major issue is solved.
Bookmarks