BCX Console Demonstration Program s49.bas |
DIM A$ CLS A$ = GetEnvVar$("COMSPEC") : ? " COMSPEC = ", A$ A$ = GetEnvVar$("PROMPT") : ? " PROMPT = ", A$ A$ = GetEnvVar$("TEMP") : ? " TEMP = ", A$ A$ = GetEnvVar$("winbootdir") : ? " winbootdir = ", A$ A$ = GetEnvVar$("windir") : ? " windir = ", A$ A$ = GetEnvVar$("PATH") : ? " PATH = ", A$ FUNCTION GetEnvVar$(B$) DIM Result$ GetEnvironmentVariable(B$, Result$, 255) FUNCTION = Result$ END FUNCTION
Result:
COMSPEC = C:\Windows\system32\cmd.exe PROMPT = $P$G TEMP = C:\Users\irwis\AppData\Local\Temp winbootdir = windir = C:\Windows PATH =