Thursday, October 22, 2009

How would I set my computers hostname as a parameter in a batch file?

I designed a c++ program and wish to control it with a batch file. Is it possible, in a batch file, to set the computers hostname as a parameter so that it could be viewed using %hostname% or similar. Thank you! :P



How would I set my computers hostname as a parameter in a batch file?norten



I believe since a batch file is just a set of commands from the commands, you can use SET and SETX to set the environment variables. Here is a reference for you: http://www.ss64.com/nt/

No comments:

Post a Comment