help find OS version by running a batch file.

Answered help find OS version by running a batch file.

  • Monday, November 26, 2012 9:51 PM
     
     

    I was able to get this to work

    FINDSTR "^%computername%$" < C:\log.txt >NUL || ECHO %computername%>>C:\log.txt

    This gives me the computer name. When I run the batch file, it saves it in the log.txt file on the C: drive which is what I was looking for.

    I wanna be able to get the OS version as well and also save it into the log.txt file. We only use xp, vista and windows 7 and I'd like to run the script on each machine and get the log file.


    Thanks

All Replies