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.