Original Post
Hello, I am trying to get the result of a call to hostname in DOS into a variable. Typing hostname on the command line give me PC-COLEMANM which is exactly what I want, but I need to be able to put this in a variable. So far I have tried: SET HOST=hostname SET HOST="hostname" SET HOST=
hostname SET HOST='hostname' And all of the above with '.exe' appended. Unfortunately instead of getting the result of the hostname call I just get whatever is on the right hand side of the equals sign. Does anybody know how I can get this working? Kind regards, Mark