Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

path for System directory ?

Status
Not open for further replies.

Eek

Technical User
Feb 4, 2001
34
CA
What is the path for the system directory ? I know it<s c:/windows/system but what if the machine runs under win nt or win 2k ....is there some kind of absolute path in VB that will adjust the path according to the OS ?
 
There is no need to link your application to scrrun.dll(for a file system object) for that.

Use GetSystemDirectory and GetWindowsDirectory API function for that.

The declares are:
Declare Function GetWindowsDirectory Lib &quot;Kernel&quot; _
(ByVal lpbuffer As String, ByVal nsize As Integer) As Integer

Declare Function GetSystemDirectory Lib &quot;Kernel&quot; _
(ByVal lpBuffer As String, ByVal nSize As Integer) As _
Integer

Hope this helps, s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top