Determining where the Windows directory is??? 
Author Message
 Determining where the Windows directory is???

Windows may be on any drive or any directory.  I wish to determine
where this directory is so I can install the dll's to the system
directory of the users machine that installs my program.
Any ideas?

Many thanks,

Andrew



Tue, 12 Nov 2002 03:00:00 GMT  
 Determining where the Windows directory is???


Quote:
> Windows may be on any drive or any directory.  I wish to determine
> where this directory is so I can install the dll's to the system
> directory of the users machine that installs my program.
> Any ideas?

Use GetWindowsDirectory API function to get this

Regards,
--
Tomislav Kralj,MCP



Tue, 12 Nov 2002 03:00:00 GMT  
 Determining where the Windows directory is???
I have tried GetWindowsDirectory, GetSystemDirectory & getTempPath to
no avail.  Am I missing a declare function?  Can someone post the
proper syntax or point me in the right direction?

Thanks,

Andrew

Quote:
>Windows may be on any drive or any directory.  I wish to determine
>where this directory is so I can install the dll's to the system
>directory of the users machine that installs my program.
>Any ideas?

>Many thanks,

>Andrew



Thu, 14 Nov 2002 03:00:00 GMT  
 Determining where the Windows directory is???


Fri, 19 Jun 1992 00:00:00 GMT  
 Determining where the Windows directory is???
I have tried GetWindowsDirectory, GetSystemDirectory & getTempPath to
no avail.  Am I missing a declare function?  Can someone post the
proper syntax or point me in the right direction?

Thanks...  Andrew

Quote:
>Windows may be on any drive or any directory.  I wish to determine
>where this directory is so I can install the dll's to the system
>directory of the users machine that installs my program.
>Any ideas?



Thu, 14 Nov 2002 03:00:00 GMT  
 Determining where the Windows directory is???
Andrew,

You can get any API declares from the API Text Viewer that is installed with
VB.  The API declaration for the API's you require are...

Public Declare Function GetWindowsDirectory Lib "kernel32" _
    Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, _
    ByVal nSize As Long) As Long

Public Declare Function GetSystemDirectory Lib "kernel32" _
    Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, _
    ByVal nSize As Long) As Long

Public Declare Function GetTempPath Lib "kernel32" _
    Alias "GetTempPathA" (ByVal nBufferLength As Long, _
    ByVal lpBuffer As String) As Long

Cheers,
Gary


Quote:
> I have tried GetWindowsDirectory, GetSystemDirectory & getTempPath to
> no avail.  Am I missing a declare function?  Can someone post the
> proper syntax or point me in the right direction?

> Thanks...  Andrew

> >Windows may be on any drive or any directory.  I wish to determine
> >where this directory is so I can install the dll's to the system
> >directory of the users machine that installs my program.
> >Any ideas?



Thu, 14 Nov 2002 03:00:00 GMT  
 Determining where the Windows directory is???


Fri, 19 Jun 1992 00:00:00 GMT  
 Determining where the Windows directory is???
http://www.mvps.org/vbnet/code/system/windirs.htm at Randy Birch's VBNet
site.

--

Doug Steele, Microsoft Access MVP
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://I.Am/DougSteele/


Quote:
> I have tried GetWindowsDirectory, GetSystemDirectory & getTempPath to
> no avail.  Am I missing a declare function?  Can someone post the
> proper syntax or point me in the right direction?

> Thanks,

> Andrew

> >Windows may be on any drive or any directory.  I wish to determine
> >where this directory is so I can install the dll's to the system
> >directory of the users machine that installs my program.
> >Any ideas?

> >Many thanks,

> >Andrew



Fri, 15 Nov 2002 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Determining where the Windows directory is???

2. Determining where the Windows directory is???

3. How do I determine what version of VBA I am using

4. determine which DOS screen I am on

5. How to determine current database directory

6. VBA to Determine the Current Directory

7. Determining 'home' directory

8. Determining 'home' directory

9. Determining whether Directory is there?

10. How do you determine DIRECTORY size?

11. Determining prog's startup directory??

12. Determining Installation directory

 

 
Powered by phpBB® Forum Software