The Below Code Sets Environment Variables:
Dim objWshShell, WshEnv, strEnvName, strEnvValue
strEnvName = "User_Name"
strEnvValue = "Sunny"
' create the WScript.Shell object
Set objWshShell = CreateObject("WScript.Shell")
' access the User Environment property
Set WshEnv = objWshShell.Environment( "User" )
' create and set the custom variable
WshEnv( strEnvName ) = strEnvValue
Remove a specified User environment variable
' access the User Environment property
WshEnv.Remove sVarName