"Windows cannot access the specified device..." during Visual Studio 2005 SP1 installation

by Gabriel Lozano-Moran 22. April 2007 20:33

 

A lot of people seem to be having issues trying to patch Visual Studio 2005 with the first Service Pack. They get the following error dialog:

---------------------------
C:\VS80sp1-KB926601-X86-ENU.exe
---------------------------
Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.
---------------------------
OK
---------------------------

When we start the self-extracting installer VS80sp1-KB926601-X86-ENU.exe, it will be launched by the explorer.exe process. The VS80sp1-KB926601-X86-ENU.exe extracts its contents to the %TEMP% folder and launches the Windows Installer Tool (msiexec.exe) which in returns interprets the extracted packages and installs the products. The exception "Windows cannot access the specified device..." can be thrown in one of these 3 processes and depending on the process there are different solutions. Therefor the first step is to identify the name of the process. This can be easily accomplished by using tools like Process Monitor, a tool that monitors file and registry activity on the system in real-time. In this walkthrough I will show you how to use Process Monitor to determine which operation by what process is returning an ACCESS DENIED. I am not claiming that this method is 100% waterproof but it is a good starting point. 

1. Download and run Process Monitor. 

2. You will notice that it will immediately start monitoring all system activity. Stop monitoring by hitting <Ctrl> + <E>, which is the keyboard shortcut to start and stop monitoring.

3. Clear the display with <Ctrl> + <X>.

4. Open the Process Monitor Filter dialog with <Ctrl> + <L>.

5. Add the following filters:

  • Process Name is explorer.exe
  • Process Name is msiexec.exe
  • Process Name is VS80sp1-KB926601-X86-ENU.exe
  • Operation is CreateFile

Due to a bug we cannot add the filter "Result is ACCESS DENIED" but the 4 other filters we can filter out enough monitored operations.

6. Click OK to close the Process Monitor Filter dialog.

7. We will highlight all the operations that return ACCESS DENIED. Open the Process Monitor Highlighting dialog with <Ctrl> + <H> and add a new highlighting for Process Name is ACCESS DENIED.

8. Click OK to close the Process Monitor Highlighting dialog. 

9. Because we are only interested in file activity we need to disable registry, process and thread activity. Make sure that the corresponding picture buttons are not highlighted.

10. Start monitoring activity by hitting <Ctrl> + <E>.

11. Launch the VS80sp1-KB926601-X86-ENU.exe self-extracting installer.

12. When you receive the Windows cannot access the specified device, path, or file error message switch back to Process Monitor and stop monitoring by hitting <Ctrl> + <E>.

13. There will be several entries but we are only interested in the operations that are highlighted namely the operations that returned ACCESS DENIED.

14. Important here is to know the name of the process. In this scenario it was the explorer.exe process.

15. Double-click one of the CreateFile operations with the ACCESS DENIED result to open the Properties windows.

16. On the bottom part of the window you will see what the the Desired Access was, in this example the user account needed Execute/Traverse, Synchronize permissions to perform the operation.

17. To see the name of the user click the Process tab. On my sandbox it was the Admin account that does not have the proper permissions.

18. Going from the above we can conclude that the Admin accounts needs Read & Execute permissions to the file VS80sp1-KB926601-X86-ENU.exe.

Technorati tags: ,

Tags:

Comments

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading