- Temporary Files Saved On Hard Drive
- Where Is The Info Saved On Hard Drive
- Is Windows Serial Key Saved On Hard Drive Drive
- Is Windows Serial Key Saved On Hard Drive Windows 10
- Where Are Emails Saved On Hard Drive
Active1 year, 10 months ago
Getting Serial Number of the Hard Drive Provided by the manufacturer through PHP : How can it be done?I want to store it in a file.
OS : windows 2000,XP,ME,Vista...
Temporary Files Saved On Hard Drive
Yes, I want the serial number of the hard drive of the Server.
Or can it be done through Adobe AIR?Or can it be done through a C program on Windows?
- Up vote 23 down vote favorite. My friend's laptop motherboard died and he needs his Windows 7 product key from the hard drive (which is still working). I connected the old drive as a secondary drive to my own computer and tried using a key finder utility, but it just keeps showing my own product key and not his.
- HDDs and SSDs are identified via their serial number. If you don’t want to open your desktop or laptop to find the hard drive serial number from the command line. Open Command Prompt in Windows. In the Windows search bar, type CMD, and select the Command Prompt from the listed results.
Is this number : BC16-5d5f unique for a hard drive?How is it different from the manufacturer given serial number?
What you are looking at is NOT the hard drive serial number. It is called the Volume Serial Number. It is generated at the time of creating and formatting the volume / partition. You can get it by using a command at command prompt: C: > vol c: if C: is the drive you want to retrieve the Volume Serial Number for. In this article we’ll show you two options to help you recover Windows product key from a dead or unbootable computer. Option 1: Connect your Dead or Unbootable Drive to Another Working PC. Simply take the hard drive out of your dead or unbootable computer, then attach it to another working computer as a slave (or secondary) drive. Ask him which hard drive he's not planning to upgrade soon, then use that hard drive serial number to generate a license key. This will prevent your user from nagging for a new license key in short time. If your user finally decides to upgrade hard drive, you may give this article's demo app to the user and ask him what the serial number is,.
Displays only the following text on my Vista Machine:
SerialNumber
On my XP machine, the command is unrecognized.
Andreas Niedermair16.4k77 gold badges6666 silver badges113113 bronze badges
dharm0usdharm0us5,4702222 gold badges7575 silver badges122122 bronze badges
9 Answers
The following returns the disk serial number. Should work with multiple drives, you'll just get multiple results. Just run it with shell_exec.
wmic.exe is located in your windows system32 folder. And wmic does exist on WinXP, Ive used it there myself.
My result on Vista:
I do not know if all harddrives provides the serial number to the OS.
It seems the wmic command is only available on the professional versions of Windows XP, Windows Vista and Windows 7.
OISOIS
PHP itself has no way of accessing the hardware like that.
You will have to either
- use a command of your operating system and call it with
system()
orexec()
- write an extension for PHP that will return you the information
If you are on Linux and have the necessary privileges and configuration you can use
Patrick GlandienPatrick Glandien$r = system('hdparm -I /dev/hda');
(replace hda with your hd) to get the serial number of a given hard drive.6,56555 gold badges3535 silver badges4646 bronze badges
that's on linux, not sure on windows though. You could execute that via 'system()'
Where Is The Info Saved On Hard Drive
Have a look at http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.hk.msdn.connection&tid=e41f0af2-2e76-4be6-9b7b-636e79ac0491&cat=zh_HK_3b03d742-993a-4f96-accd-1063c6bfd559&lang=zh&cr=HK&sloc=&p=1
Might be a way forward.
Also, when I ran a 'dir' on the command prompt, it shows:
Is that what you're looking for?
Andrei Serdeliuc ॐAndrei Serdeliuc ॐ4,47544 gold badges3232 silver badges6363 bronze badges
I can't tell you the answer, but I guess you'll have to look in the direction of extensions (maybe even writing one yourself). I doubt this is something PHP's core has.
Edit: I forgot about the raw power of 'exec' :-/
Bart van HeukelomBart van Heukelom21.5k5252 gold badges156156 silver badges276276 bronze badges
Run the following with shell_exec (test in command prompt if needed):
DISKDRIVE doesn't get the actual serial number for my drive that shows plugged in through an IDE channel. the above seemed to get the actual serial numbers for all of my drives. Tag will also return you what type of drive it is which may be helpful for identifying different drives.
Example output:
Dustin GDustin G
Do you want the hard drive from the server or a client? PHP runs on the server so getting it straight from the client doens't seem possible to me.
The manual suggest you can execute commands on you server:http://nl2.php.net/manual/en/ref.exec.php
Unfortunately I don't enough Unix to get you hdd serials.
MrHusIs Windows Serial Key Saved On Hard Drive Drive
MrHusIs Windows Serial Key Saved On Hard Drive Windows 10
25.2k55 gold badges2525 silver badges3131 bronze badges
You can use
or
Then you can echo it.
Based on Patrick Daryll Glandien's hint, you can execute following on *nix based machines. $hdserial=
hdparm -I /dev/hda
hdparm -i /dev/sda
returns lesser info. But as hdparm needs root access, it did not run with php for me.The '2>&1' part is used from the suggestion here.
Community♦
LeninLenin
Veeren SharmaVeeren Sharma
Where Are Emails Saved On Hard Drive
On *nix based machine you can also use
ls /dev/disk/by-id/
because hdparm
need root permission (see Patrick Daryll G. answer).and you will get something like this
Community♦
Fery WardiyantoFery Wardiyanto