Does anybody know how to set an environment variable in vb?
In dos we would just use
set variable=value
but i'd like to do this would showing a command window.
Printable View
Does anybody know how to set an environment variable in vb?
In dos we would just use
set variable=value
but i'd like to do this would showing a command window.
Private Declare Function SetEnvironmentVariable Lib "kernel32" Alias "SetEnvironmentVariableA" (ByVal lpName As String, ByVal lpValue As String) As Long
Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (ByVal lpName As String, ByVal lpBuffer As String, ByVal nSize As Long) As Long