You can disable access to USB ports on a Windows PC through the registry to prevent unauthorized data transfer or virus spreading via USB drives. This involves navigating the registry editor, opening the usbstor key, changing the Start value from 3 to 4, and refreshing the desktop. Re-enabling USB ports requires changing the Start value back to 3.