WinDir$

System function

The WinDir$ function returns the name of the directory where Windows is installed.

Syntax

var$=WinDir$()

Return value

var$, string containing the name of the directory where Windows is installed

Examples

 
var$=WinDir$()

msgbox(var$) 'Returns C:\Windows if Windows system is installed on C:

 
a$=windir$()+"\system"

msgbox(a$) 'Returns C:\Windows\system