Home > Language Reference > System Functions > WinDir$

WinDir$

The WinDir$ function returns the folder of the Windows folder.

Usage

Used to acquire dynamically the folder where Windows programs are installed.

Syntax

var$ = WinDir$()

Parameters

None.

Return value

var$, string, folder of Windows folder.

Examples

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

a$=windir$()+"\system"
msgbox(a$) 'Returns C:\Windows\system