by Kevin Smithwick (4 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (2 Votes)
Get the system directory with 1 line of code and no API.
Assumes
I've tested this on Windows 9x/2000/NT/XP, but I cannot say it will work on ME.
msgbox Environ$("windir") & IIf(Len(Environ$("OS")), "\SYSTEM32", "\SYSTEM")