Volume Serial Number: Find It and Change It
Learn what a volume serial number is, how to find it using dir and PowerShell, how to change it, and why anti-cheat systems track volume serials for HWID bans.
By SensePublished
What Is a Volume Serial Number?
A volume serial number is a unique identifier assigned to a disk partition when it is formatted. Every time you format a drive or partition in Windows, the operating system generates a new volume serial number and writes it to the partition's boot sector. This number is associated with the logical volume (the formatted partition), not with the physical disk hardware.
The volume serial number is a 32-bit value, typically displayed as two groups of four hexadecimal digits separated by a hyphen. For example, A1B2-C3D4. This format gives approximately 4.3 billion possible values, which is enough to make collisions rare but not impossible.
It is crucial to understand the distinction between a volume serial number and a disk serial number. The volume serial number is software-generated during formatting and belongs to the partition. Reformatting the same partition creates a new volume serial number. The disk serial number (also called the drive serial number) is a hardware identifier assigned during manufacturing and is stored in the drive's firmware. It does not change when you format the drive.
Anti-cheat systems may track both values, and confusing the two can lead to ineffective attempts at identity management.
How Volume Serial Numbers Are Generated
When Windows formats a partition, it generates the volume serial number based on the current date and time at the moment of formatting. The exact algorithm combines the date components (year, month, day) with the time components (hours, minutes, seconds) through a series of additions and shifts to produce the 32-bit value.
Because the generation is based on the timestamp of the format operation, it is effectively random from the perspective of anyone who does not know the exact moment the format occurred. Two partitions formatted at different times will almost certainly have different volume serial numbers, even on the same drive.
The volume serial number is written into the Volume Boot Record (VBR) of the partition. For NTFS partitions, it is stored at a specific offset in the boot sector. For FAT32 partitions, it is stored at a different offset in the FAT32 boot sector. The file system driver reads this value when the volume is mounted and makes it available to applications through standard Windows APIs.
How to Find Your Volume Serial Number
Method 1: The dir Command
The simplest method is using the dir command in Command Prompt. Just run:
dir C:The first two lines of output show the volume label and serial number:
Volume in drive C is Windows
Volume Serial Number is A1B2-C3D4Replace C: with any drive letter to check other partitions. Each mounted partition has its own volume serial number.
Method 2: vol Command
The vol command is even more direct:
vol C:This outputs just the volume label and serial number with no file listing. It works for any drive letter.
Method 3: PowerShell
PowerShell can retrieve volume serial numbers through WMI:
Get-CimInstance -ClassName Win32_LogicalDisk | Select-Object DeviceID, VolumeSerialNumber, VolumeNameThis lists every mounted volume with its drive letter, serial number, and label. The serial number is displayed without the hyphen (as a continuous 8-character hex string).
For just the C: drive:
(Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DeviceID='C:'").VolumeSerialNumberMethod 4: WMIC
wmic logicaldisk get caption, volumeserialnumberThis shows the drive letter and volume serial number for each mounted volume. Like the PowerShell output, the serial number appears without the hyphen.
Method 5: Windows API (For Developers)
Programmatically, the GetVolumeInformation Windows API function retrieves the volume serial number. This is the API that most applications, including anti-cheat software, use to read the value. The function takes a root path (like C:\) and fills a structure with the volume name, serial number, file system name, and other attributes.
Anti-cheat systems call this API (or its equivalent at the kernel level) to collect volume serial numbers as part of their hardware fingerprinting process.
Volume Serial Numbers and Anti-Cheat Systems
Volume serial numbers occupy an interesting position in the anti-cheat fingerprinting landscape. They are not hardware identifiers in the traditional sense, since they change with reformatting. However, they have properties that make them useful for tracking.
A typical user does not reformat their drives frequently. The volume serial number of the system partition (usually C:) remains stable for months or years at a time. This gives it a level of persistence that is useful for fingerprinting even though it is technically changeable.
Anti-cheat systems typically collect the volume serial numbers of all mounted partitions, with special attention to the system volume. The serial number of the C: drive is almost always included in the hardware fingerprint because it is guaranteed to exist and is easy to read.
Some anti-cheats also check for consistency between the volume serial number and other identifiers. If a player changes their volume serial number but the disk serial number (hardware) remains the same, the anti-cheat sees that the same physical drive has a new volume serial. Depending on the implementation, this might flag the system as suspicious or simply be noted as a data point in the broader fingerprint comparison.
Volume serial numbers are considered a "soft" identifier compared to hardware serials. They carry less weight in matching algorithms because they can legitimately change (through reformatting or OS reinstall). However, they add to the overall confidence of a match when they align with other identifiers.
How to Change Your Volume Serial Number
Unlike hardware serial numbers that are burned into firmware, volume serial numbers can be changed through several methods.
Method 1: Reformatting the Partition
The most straightforward way to get a new volume serial number is to format the partition. When Windows creates a new file system on the partition, it generates a fresh serial number.
For the system partition (C:), this effectively means reinstalling Windows, since you cannot format the drive you are currently running from. A clean Windows installation formats the system partition and assigns a new volume serial number.
For non-system partitions, you can format them through Disk Management or the command line:
format D: /FS:NTFS /QThis quick-formats the D: drive as NTFS and assigns a new serial number. Obviously, formatting destroys all data on the partition.
Method 2: Third-Party Tools
Several free utilities can change the volume serial number without formatting the drive. These tools directly modify the bytes in the partition's boot sector where the serial number is stored.
VolumeID (formerly from Sysinternals, now part of Microsoft) is one of the most well-known tools for this purpose. It allows you to set a specific volume serial number on any partition:
volumeID C: A1B2-C3D4This sets the volume serial number of the C: drive to A1B2-C3D4. A reboot is typically required for the change to take effect on the system partition.
Other tools with similar functionality include Hard Disk Serial Number Changer and various partition management utilities that include serial number editing as a feature.
Method 3: Manual Hex Editing
For those comfortable with low-level disk editing, the volume serial number can be changed by directly editing the boot sector of the partition using a hex editor. The serial number is located at a specific offset in the boot sector:
- NTFS: Offset
0x48from the start of the boot sector (8 bytes, though only the first 4 are the traditional volume serial) - FAT32: Offset
0x43from the start of the boot sector (4 bytes) - FAT16: Offset
0x27from the start of the boot sector (4 bytes)
This method requires unmounting the volume first (or working from a boot disk for the system partition) and carries the risk of corrupting the file system if the wrong bytes are modified. It is not recommended unless you are confident in what you are doing.
Important Considerations When Changing Volume Serials
Some applications use the volume serial number for licensing. Changing it can deactivate software that checks the serial as part of its copy protection. If you change the volume serial and an application stops working, the serial change is the likely culprit.
Windows itself does not depend on the volume serial number for core functionality, but some system features reference it. For example, the Volume Shadow Copy Service (VSS) uses volume identifiers for snapshot management. Changing the serial is unlikely to break VSS, but it is worth being aware of the connection.
After changing the volume serial number, verify the change by running vol C: or dir C: again to confirm the new value is in effect.
Volume Serial Number vs. Disk Serial Number
This distinction is important enough to warrant its own section because confusion between these two values is extremely common.
| Feature | Volume Serial Number | Disk Serial Number |
|---|---|---|
| What it identifies | A formatted partition | A physical disk drive |
| Where it lives | Partition boot sector | Drive firmware |
| Generated by | Windows during formatting | Manufacturer at factory |
| Survives format | No (new one generated) | Yes (unchanged) |
| Survives OS reinstall | No | Yes |
| How to change | Tools, reformat, hex edit | Cannot without firmware modification |
| Weight in anti-cheat | Moderate ("soft" identifier) | High ("hard" identifier) |
A single physical disk can have multiple partitions, each with its own volume serial number. But the disk itself has only one hardware serial number that applies regardless of how many partitions it contains.
Anti-cheat systems that track both values get two independent data points from the same physical device. Changing one but not the other provides incomplete coverage.
Multiple Drives and Volume Serials
Most gaming systems have at least two volumes: the system partition (C:) and often a secondary drive for games (D:, E:, etc.). Some setups include additional partitions for recovery, data storage, or other purposes.
Anti-cheat systems may collect volume serial numbers from multiple mounted volumes, not just the system drive. They might specifically target the volume where the game is installed, since that is the drive letter the anti-cheat interacts with most directly.
When managing volume serial numbers for HWID spoofing purposes, it is important to address all volumes that the anti-cheat might query. Changing only the C: drive serial while leaving the game drive serial unchanged creates an incomplete spoof.
Sense AC addresses volume serial numbers across all relevant drives as part of its identifier management. This ensures that no matter which volume the anti-cheat checks, it sees a consistent set of new identifiers.
Volume Serial Numbers and USB Drives
External USB drives and flash drives also have volume serial numbers. When you connect a USB drive, Windows mounts it and reads the volume serial from the boot sector. Any application, including an anti-cheat, can query this value.
Some anti-cheat systems record the volume serial numbers of connected external drives as supplementary identifiers. While this is less common than tracking internal drive serials, it provides additional fingerprinting data.
If you are concerned about volume serial tracking, be aware that connecting the same USB drive across different systems creates a common data point that could theoretically be used for cross-system identification, though this is not a common anti-cheat technique.
GUID Partition Table (GPT) and Volume GUIDs
Modern Windows installations use GPT (GUID Partition Table) rather than the older MBR (Master Boot Record) partitioning scheme. GPT assigns a unique GUID to each partition in the partition table. This partition GUID is separate from the volume serial number.
Windows also assigns a volume GUID to each mounted volume, accessible through the mountvol command or WMI. The volume GUID looks like \\?\Volume{a1b2c3d4-e5f6-7890-abcd-ef1234567890}\.
Between the volume serial number, the GPT partition GUID, and the Windows volume GUID, there are three different identifier values associated with a single partition. Anti-cheat systems can potentially track any or all of these. Comprehensive HWID spoofing needs to account for each one.
Summary
A volume serial number is a 32-bit identifier generated by Windows when a partition is formatted. It is stored in the partition's boot sector and can be retrieved using dir, vol, PowerShell, or WMIC commands. Unlike hardware disk serial numbers, volume serial numbers can be changed using tools like VolumeID, through reformatting, or with manual hex editing. Anti-cheat systems track volume serial numbers as part of their hardware fingerprint, though they carry less weight than hardware identifiers. For thorough HWID management after a hardware ban, Sense AC handles volume serial numbers alongside disk serials, motherboard serials, and all other tracked identifiers to present a complete and consistent new hardware profile.