Understanding Custom Error Codes


When PerfectDisk operations succeed the environment variable named ERRORLEVEL is set to 0 (zero). When operations are unsuccessful, the ERRORLEVEL contains either a Win32 error code, or one of the following custom PerfectDisk error codes:

Error Code

Error Term

Error Description

536870913 (0x20000001)

ERROR_INVALID_DRIVE

The drive is not a fixed hard drive formatted using FAT, FAT32, exFAT or NTFS file systems.

536870914 (0x20000002)

ERROR_COMPUTER_NOT_FOUND

The computer name entered could not be located.

536870916 (0x20000004)

ERROR_ACCESS_DENIED

You do not have sufficient permissions to perform the requested operation(s).

536870917 (0x20000005)

ERROR_LOCK_DRIVE_FAILED

The drive could not be locked to do an offline defragmentation pass.

536870918 (0x20000006)

ERROR_INVALID_LICENSE

The PerfectDisk license key is invalid for this version of PerfectDisk, or has expired. If the license is corrupt, you would get a -1 error code (see next entry).

-1 (-0x00000001)

Catchall Error

If an operation fails for some reason other than the causes listed above, PerfectDisk sets the ERRORLEVEL to -1.

Related Topics

§        Running PerfectDisk from the Command Line

§        Accessing PerfectDisk CLI Tool (PDCMD.exe) to Run PerfectDisk Commands

§        PDCmd.exe Command Reference