I am confused

if i type "set moo=moosvalue" at the command prompt it changes the value of moo to moosvalue. However if I use "system("set moo=moosvalue");" it doesnt change moo. Does anyone know why? and if so could you please tell me.

I have been playing with the system(command) thing and this is the only thing I cant get to work. if I do "system("set m");" it shows me the variables starting with m. ect.

Thanks for any help.