Can Reading a File Virtualization?
-
I have a set of text files stored in a program files folder which I require the ability to read. I do NOT need to write to these files (I know that will cause virtualization). If I read these files as a standard user will it cause them to be virtualized? Kind Regards
-
I have a set of text files stored in a program files folder which I require the ability to read. I do NOT need to write to these files (I know that will cause virtualization). If I read these files as a standard user will it cause them to be virtualized? Kind Regards
It will still be virtualized, unless you elevate your aplication automatically with a manifest file. Ignore this, I didn't notice (don't know how) that you don't intend writing to the file. regards,
Jonathan Wilkes Darka[Xanya.net]
modified on Thursday, April 10, 2008 1:34 PM
-
It will still be virtualized, unless you elevate your aplication automatically with a manifest file. Ignore this, I didn't notice (don't know how) that you don't intend writing to the file. regards,
Jonathan Wilkes Darka[Xanya.net]
modified on Thursday, April 10, 2008 1:34 PM
Thanks for that. Just a small follow up question, if I try to copy a file from a program files folder into the UserAppData folder would that cause the file in the program files fodler to virtualize? Code I would use: File.Copy(source, destination, true); Many Thanks
-
Thanks for that. Just a small follow up question, if I try to copy a file from a program files folder into the UserAppData folder would that cause the file in the program files fodler to virtualize? Code I would use: File.Copy(source, destination, true); Many Thanks
Depending on the elevation requirements of your application the file in Program Files will already be virtualized and will be copied from it's virtual location to the UserAppData folder (I'm 99% certain this is correct, but if anyone disagrees please let me know). If your application already runs elevated then the file will be correctly stored under the Program Files folder and copying it to your UserAppData folder will not cause virtualization. regards,
Jonathan Wilkes Darka[Xanya.net]
modified on Thursday, April 10, 2008 1:33 PM
-
I have a set of text files stored in a program files folder which I require the ability to read. I do NOT need to write to these files (I know that will cause virtualization). If I read these files as a standard user will it cause them to be virtualized? Kind Regards
Ignore my previous replies. If you are only reading from a previously installed file, then the read will not be virtualized unless your application has at any time written to the file in which case you'll read from the virtualized version.
Jonathan Wilkes Darka[Xanya.net]
-
Thanks for that. Just a small follow up question, if I try to copy a file from a program files folder into the UserAppData folder would that cause the file in the program files fodler to virtualize? Code I would use: File.Copy(source, destination, true); Many Thanks
FIle system virtualization is only used in directories that you don't have write privs to. Since %APPDATA% is always writable, virtualization doesn't apply.
--Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ I work for Keyser Söze