Most of the viruses modify the autorun.inf file of the logical drives, which causes them to open up improperly.
This is a very common error which is caused by the modification of the “autorun.inf” files of a particular drive. When you try to open a particular disk drive, it opens up in a new window.
This method can also be used to correct the problem where right-clicking on a drive brings up the right-click menu options in the for of various symbols like “ ?*%?? ”
For example:

I tried opening D:, and it opened in a new window.
To correct this error, we have to delete the old autorun.inf from the root of that drive, and re-create it. To do so, follow these steps-:
Go to Tools, Folder options.
Under View, select “show hidden files”.
Also uncheck the “hide protected operating system files”.
A warning will pop-up (you have chosen to display…) Say “yes”.

Now, go to the drive which opens up improperly. In my case, it's the D:
You will see a file called “autorun.inf” in the root of the drive.
Delete this file, and re-start your computer.
Again go to that drive, and double click on it(or right-click) to open a “Open with dialog box”
Select Browse.
Point to C:Windowsexplorer.exe
Press OK.
The drive will now open up. A fresh autorun.inf will automatically be created.
Restart the computer.
The problem has gone…..!!
As a precautionary method, use a good anti-virus, and check your computer frequently for viruses and other risks.