Results 1 to 5 of 5

Thread: How to find out what the window system dir is

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Location
    NH
    Posts
    90

    Lightbulb

    Is there som way to tell what the windows system directory is. I know that I can tell ther version of the os but that does not always tell you what the windows system dir is?

    Thanks Scott

  2. #2
    Junior Member
    Join Date
    Jun 2000
    Location
    Manchester, England
    Posts
    28
    Declare this function in a code module: Public Declare Function GetSystemDirectory Lib "kernel32" Alias _
    "GetSystemDirectoryA" (ByVal lpbuffer As String, ByVal nSize As Long) As Long


    Example

    Public Function fnc_sGetWinSysDir() As String

    'Returns the windows system folder. i.e. "C:\WINNT\SYSTEM32"
    'or "C:\WINDOWS\SYSTEM"

    Dim lpbuffer As String * 144
    Dim Length%
    Length% = GetSystemDirectory(lpbuffer, Len(lpbuffer))
    fnc_sGetWinSysDir = Left(lpbuffer, Length%)

    End Function
    We watch in reverence as Narcissus is turned to a flower.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Location
    NH
    Posts
    90

    Smile Thanks

    Thanks that works great!

  4. #4
    Lively Member
    Join Date
    Apr 2000
    Posts
    110

    Exclamation hmmm...

    I posted an answer to this qestion about 2 days ago! I'm not being snappy, but there are probably about 100 posts on this site asking the same thing. Do a search first before posting... (same goes for everyone asking about bloody key hooks!)

    Anywayz, just stating the obvious.

    Laterz

    REM
    "Innovate, don't immitate."

  5. #5
    Guest
    Actually this was his first post and he is new to the site so he probably doesn't know about searching yet.

Posting Permissions

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



Click Here to Expand Forum to Full Width