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.
Monday, November 26, 2012 9:56 PM
Might look around here.
or ask them over here.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
Tuesday, November 27, 2012 4:46 AMwmic os get caption, version
Best regards Biswajit Biswas Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. MCP 2003,MCSA 2003, MCSA:M 2003, CCNA, MCTS, Enterprise Admin