Error 1004 in Windows 7, Vista and XP may occur on PCs where iTunes and Microsoft Office Excel programs get corrupted. Microsoft Office Excel may show you Windows error 1004 while copying worksheet automatically. This error may occur due to programming errors or otherwise due to problems in the MS Excel registry entries. On the other hand, iTunes may show you error 1004 if its registry configurations are incorrect. Let us see the actual steps to solve Windows error 1004 in Windows 7, Vista and XP besides this automatic fix available here:

Solve Internal Registry Conflicts
Incorrect registry configurations can be the main source of error code 1004. For example, an important registry entry is modified in incorrectly. You need to analyze the state of your registry and then take actions accordingly.Download a Registry Cleaner.software and clean-out your registry.
Save and Close Worksheet Periodically While Copying
In order to fix error 1004 in Windows 7, Vista and XP, save and close the active worksheet periodically while it is being copied. In other words, when the copy process is being performed, save and close that worksheet.
The code to save your worksheet is as below:
oBook.SaveAs "c:\test2.xls"
Here, C:\ is the drive letter and Test2.xls is the file name. You may replace these values with anything other you prefer.
Insert a New Worksheet from Templates
Another way of solving error 1004 is to insert a new worksheet from the templates available on your computer. The steps required to do this task are as under:
Put your Device in DFU Mode
To solve error 1004 on iTunes, you have to put the corresponding device on the DFU mode. To do so, follow these guidelines:
Change the Settings to System Defaults
Error 1004 may occur if iTunes is not properly configured. Reset the application settings to solve the problem: