Computer Hope

Microsoft => Microsoft DOS => Topic started by: silent1 on May 03, 2006, 11:27:06 AM

Title: How to get the computer's name
Post by: silent1 on May 03, 2006, 11:27:06 AM
So I think I've got the batch file just about working, but I need to include the machine's name in the .evt filename.

How do I get the machine's name?


Thanks!
Title: Re: How to get the computer's name
Post by: silent1 on May 03, 2006, 02:08:04 PM
I figured that it was an easy answer, but I can't believe how long it took me to find it using google.

For anyone else who may not know: %COMPUTERNAME%
Title: Re: How to get the computer's name
Post by: GX1_Man on May 03, 2006, 04:30:12 PM
But you will NEVER forget it will you?  ;)
Title: Re: How to get the computer's name
Post by: Dilbert on May 03, 2006, 07:58:30 PM
I, on the other hand, will forget in five minutes as I don't use that variable. ::)