<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Any possibility to extract BIOS & HDD serial number?]]></title>
		<link>http://forums.approximatrix.com/viewtopic.php?id=408</link>
		<atom:link href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=408&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Any possibility to extract BIOS & HDD serial number?.]]></description>
		<lastBuildDate>Sun, 14 Feb 2016 07:14:10 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Any possibility to extract BIOS & HDD serial number?]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2369#p2369</link>
			<description><![CDATA[<p>Try with WMIC commands</p><p><a href="http://net-informations.com/q/mis/wmic.html">http://net-informations.com/q/mis/wmic.html</a></p><p>Macin</p>]]></description>
			<author><![CDATA[null@example.com (georgemacin)]]></author>
			<pubDate>Sun, 14 Feb 2016 07:14:10 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2369#p2369</guid>
		</item>
		<item>
			<title><![CDATA[Re: Any possibility to extract BIOS & HDD serial number?]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1742#p1742</link>
			<description><![CDATA[<p>If you&#039;re confident users have Windows Vista or higher, you can retrieve both using the <a href="http://support.microsoft.com/kb/558124">wmic</a> command.&nbsp; An example Fortran program is below:</p><div class="codebox"><pre><code>program serial
implicit none

    character(10), parameter::outfile = &quot;serial.txt&quot;
    
    character(len=40)::ignore, results

    call get_serial(&quot;diskdrive&quot;, outfile)
    
    ! Load in results
    open(unit=100, file=&quot;serial.txt&quot;, status=&quot;old&quot;)
    read(100, *) ignore
    read(100, *) results
    
    print *, &quot;Hard disk serial #: &quot;, trim(results)
    close(100)
    
    call get_serial(&quot;bios&quot;, outfile)
    
    ! Load in results
    open(unit=100, file=&quot;serial.txt&quot;, status=&quot;old&quot;)
    read(100, *) ignore
    read(100, *) results
    
    print *, &quot;Bios serial #: &quot;, trim(results)
    close(100)
    
    call unlink(outfile)
    
    contains
    
    subroutine get_serial(serialid, finalfile)
    implicit none    
    
    character(*), intent(in)::serialid
    character(*), intent(in)::finalfile
    
    character(128)::serialcmd
    
        serialcmd = &quot;wmic &quot;//&amp;
                    trim(serialid)//&amp;
                    &quot; get serialnumber &gt; unicode.txt &amp;&amp; type unicode.txt &gt; &quot;//&amp;
                    trim(finalfile)
        
        call execute_command_line(trim(serialcmd))
        
        call unlink(&quot;unicode.txt&quot;)
    
    end subroutine get_serial
end program serial</code></pre></div><p>If you&#039;ll notice, I redirect the results of <strong>wmic</strong> to temporary file <em>unicode.txt</em> and then subsequently redirect it via &quot;TYPE&quot; to another final file.&nbsp; The reason for this double-redirect is that the original output seems to be in a unicode format, but ASCII is so much easier to deal with when reading in results in Fortran.&nbsp; Hence, I use the &quot;TYPE&quot; command, which should always generate pure ASCII.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 29 Dec 2014 13:24:02 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1742#p1742</guid>
		</item>
		<item>
			<title><![CDATA[Any possibility to extract BIOS & HDD serial number?]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1737#p1737</link>
			<description><![CDATA[<p>Hello guys</p><p>I m looking for a code to extract BIOS &amp; HDD serial number (to string). Can anybody suggest?</p><p>Thank you.</p>]]></description>
			<author><![CDATA[null@example.com (dollarbulldog)]]></author>
			<pubDate>Sat, 27 Dec 2014 13:55:08 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1737#p1737</guid>
		</item>
	</channel>
</rss>
