A batch file to retrieve the serial number of your PC

December 2016

Issue


I would like to retrieve the serial number of a PC in a text file via a small .bat script.
I know that the command "wmic csproduct" gives the serial, but how to implement it?

Solution

  • wmic csproduct get identifyingnumber > c:\serial_number.txt 

Thanks to barnabe0057

Related :

This document entitled « A batch file to retrieve the serial number of your PC » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.