Re: Windows default path
From: Norm Cook (normcookNOSPAM_at_cableone.net)
Date: 09/15/04
- Next message: Gerald Hernandez: "Re: Installing VS6 After VS.Net 2003"
- Previous message: Michael Satterwhite: "How to remove GDI Detection Tool"
- In reply to: Marty: "Windows default path"
- Next in thread: Marty: "Re: Windows default path"
- Reply: Marty: "Re: Windows default path"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Sep 2004 10:32:52 -0500
For my OS (W2K)
Debug.print Environ$("windir") and Debug.print Environ$("systemroot")
both give C:\WINNT
The API method below should work for any OS
Option Explicit
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As
Long) As Long
Private Sub Form_Load()
Dim tmp As String
Dim r As Long
tmp = Space$(260)
r = GetWindowsDirectory(tmp, 260)
Debug.Print Left$(tmp, r)
End Sub
"Marty" <reply@to.forum> wrote in message news:_NY1d.32557$XP3.16505@edtnps84...
> How do I get the windows path? For my application it is app.path, is it
> something similar for the OS path?
>
> Is it "$(WinSysPath)" ? but it doesn't work.
>
> Thanks
>
> Marty
- Next message: Gerald Hernandez: "Re: Installing VS6 After VS.Net 2003"
- Previous message: Michael Satterwhite: "How to remove GDI Detection Tool"
- In reply to: Marty: "Windows default path"
- Next in thread: Marty: "Re: Windows default path"
- Reply: Marty: "Re: Windows default path"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|