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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MoveFile: Access denied ???

MoveFile: Access denied ???

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
4 Posts 3 Posters 1 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.
  • G Offline
    G Offline
    gabbana
    wrote on last edited by
    #1

    Hi, I have a big problem. I am trying to use the simple method MoveFile but getting Error code 5: Access denied. I have Windows Vista and UAC enabled. If I right click on the app and select "Run as administrator" -> everything works fine. My problem is, many users have normal accounts and don't run apps as an administrator. So my question is how can i implement the feature to move the file as a normal user? Thanks. bye, gabbana

    P 1 Reply Last reply
    0
    • G gabbana

      Hi, I have a big problem. I am trying to use the simple method MoveFile but getting Error code 5: Access denied. I have Windows Vista and UAC enabled. If I right click on the app and select "Run as administrator" -> everything works fine. My problem is, many users have normal accounts and don't run apps as an administrator. So my question is how can i implement the feature to move the file as a normal user? Thanks. bye, gabbana

      P Offline
      P Offline
      Perspx
      wrote on last edited by
      #2

      Where is the file being moved from/to? If it's the Program Files directory there's not much you can do about that. Regards, --Perspx

      "I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
      "Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds

      G 1 Reply Last reply
      0
      • P Perspx

        Where is the file being moved from/to? If it's the Program Files directory there's not much you can do about that. Regards, --Perspx

        "I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
        "Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds

        G Offline
        G Offline
        gabbana
        wrote on last edited by
        #3

        The files moving from C:\myfile.txt to C:\myapp\txt So its my own directory...

        L 1 Reply Last reply
        0
        • G gabbana

          The files moving from C:\myfile.txt to C:\myapp\txt So its my own directory...

          L Offline
          L Offline
          Larry Mills Sr
          wrote on last edited by
          #4

          If the file is set to "Read Only" this problem will occur. Vista is looking for permission to move that file, so something is telling Vista that it needs permission to move that file. Check the files property.

          A C++ programming language novice, but striving to learn

          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