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. windows directory search

windows directory search

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
3 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.
  • S Offline
    S Offline
    Subrat Patnaik
    wrote on last edited by
    #1

    hi all, i have a folder named "test" which is installed in windows directory when my program gets installed.if windows installed in D then my folder path is D:\\test can i have some example code, in which i can open this folder and write a file with admin privileges. i want a code example to open the folder "test" in windows directory and write a file... thanks...

    C D 2 Replies Last reply
    0
    • S Subrat Patnaik

      hi all, i have a folder named "test" which is installed in windows directory when my program gets installed.if windows installed in D then my folder path is D:\\test can i have some example code, in which i can open this folder and write a file with admin privileges. i want a code example to open the folder "test" in windows directory and write a file... thanks...

      C Offline
      C Offline
      chirag_chauhan
      wrote on last edited by
      #2

      You can use SHGetFolderPath(CSIDL_WINDOWS) function to get the Windows path and then use normal file operations to complete the tasks. You can see some example at http://msdn.microsoft.com/en-us/library/bb762181(VS.85).aspx[^]

      1 Reply Last reply
      0
      • S Subrat Patnaik

        hi all, i have a folder named "test" which is installed in windows directory when my program gets installed.if windows installed in D then my folder path is D:\\test can i have some example code, in which i can open this folder and write a file with admin privileges. i want a code example to open the folder "test" in windows directory and write a file... thanks...

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Subrat Patnaik wrote:

        i have a folder named "test" which is installed in windows directory...

        Which implies: d:\windows\test If you have d:\test instead, the test folder resides off the root of the Windows volume.

        "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        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