Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. Can Reading a File Virtualization?

Can Reading a File Virtualization?

Scheduled Pinned Locked Moved Windows API
question
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Farm Developer
    wrote on last edited by
    #1

    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

    J 2 Replies Last reply
    0
    • F Farm Developer

      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

      J Offline
      J Offline
      Jonathan Darka
      wrote on last edited by
      #2

      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

      F 1 Reply Last reply
      0
      • J Jonathan Darka

        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

        F Offline
        F Offline
        Farm Developer
        wrote on last edited by
        #3

        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

        J M 2 Replies Last reply
        0
        • F Farm Developer

          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

          J Offline
          J Offline
          Jonathan Darka
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • F Farm Developer

            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

            J Offline
            J Offline
            Jonathan Darka
            wrote on last edited by
            #5

            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]

            1 Reply Last reply
            0
            • F Farm Developer

              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

              M Offline
              M Offline
              Michael Dunn
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups