Environment: SetEnvironmentVariable |
Sets, creates, or deletes an environment variable in the specified region.
Public Sub SetEnvironmentVariable( ByRef Variable As String, ByRef Value As String, Optional ByVal Target As EnvironmentVariableTarget = Process )
Default: Process
Setting the variable in the Process region only affects the current process that is setting the variable. Setting a variable in a User or Machine region will set the values in the registry.
by setting the value to an empty string, the variable will be deleted.