+ Reply to Thread
Results 1 to 2 of 2

Thread: How to expand %windir% to proper path?

  1. #1
    Junior Member
    Join Date
    Apr 2012
    Posts
    46

    How to expand %windir% to proper path?

    I want to get full directory path from %windir% variable.

    How to do this in windows desktop application?

    Things is that I want to expand the specified path.

  2. #2
    Junior Member
    Join Date
    Apr 2012
    Posts
    38
    Use following code:

    Code:
    TCHAR szWindowsDir[MAX_PATH] = "" ;
    ExpandEnvironmentStrings("%windir%", szWindowsDir, MAX_PATH) ;
    Hope this helps.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts