Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question is related to http://stackoverflow.com/questions/54989/change-windows-hostname-from-command-line, but I'm in a different situation. The netdom tool will not work on a computer not joined to a domain. I've tried setting the hostname from the registry, but I was wondering if there was another way from the command-line.

share|improve this question
    
Have you looked at the other solutions on that page? Assuming that they work all you'd need to do would be to copy the script to notepad, change the hostname in the script, save it as something.vbs and then run it. –  ho1 Jun 9 '10 at 10:52
add comment

migrated from stackoverflow.com Jun 9 '10 at 19:06

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 3 down vote accepted

Right from the link you provided:

wmic computersystem where name="OLDNAME" call rename name="NEWNAME"

Then reboot with

shutdown /r /t 0
share|improve this answer
    
How careless of me. Thanks for pointing that out! –  Joe Jun 9 '10 at 23:28
    
@Joe - No prob! If this solves your problem, you can accept it by clicking the check box under the voting to the left of my answer. –  MDMarra Jun 10 '10 at 1:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.