I am using Windows 2000’s Paleolithic batch programming language to set environment variables and pass them along to an executable (VB, MSAccess).
I am using this in a .BAT file:
So that sets the variable, but it’s only alive inside the batch file.
Then I need to fire up a program that does this in VB:
Dim MyVar as String
MyVar = Environ$(“ ThisIsWhatIWantToReadWithEnviron”)
MsgBox "Environ returned: " & MyVar
But the variable is empty.
Unix has a command “export” to push an environment variable out to other shells and executables.
Is there a DOS equivalent?