How to Fix: 'Error 1317: Setup Cannot Create Directory' when Installing a Program

Dennis Faas's picture

Infopackets Reader Bob T. writes:

" Dear Dennis,

I just upgraded to Windows 10; unfortunately the Windows 10 upgrade corrupted my Start menu and tray bar, so I decided to do a clean install - which also means I have to reinstall all my programs. I'm now trying to install MS Office 2010 on the machine, but the MS Office setup.exe program keeps telling me 'Error 1317: Setup Cannot Create Directory C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office', and then rolls back and cancels the installation. I have tried using my original MS Office disc, and have also downloaded MS Office 2010 from the web, but I get the same error message: 'Error 1317: Setup Cannot Create Directory C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office'. I've even tried installing MS Office 2013 trial edition, but that also gives me 'Error 1317: Setup Cannot Create Directory'. What can I do to fix this problem? "

My response:

Oddly enough I encountered this error twice in the same week on two different systems. Another symptom of this error is that if you click the Start menu, none of your installed programs show up in the list, with the exception of a few default Windows programs.

The reason this happens is because the permissions on the directory 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs' (and subsequent sub-folders) have been corrupted. So, if you try to install a program (any program), or if you click the Start menu, you're essentially getting an 'access denied' error. The same error message: 'Setup Cannot Create Directory <some directory name>' will appear even if you you log in with the hidden Administrator account, which has the highest permissions on the system by default.

How to Fix: 'Error 1317: Setup Cannot Create Directory' when Installing a Program

Fixing this error should be relatively straightforward; however, in the other instance I came across this week, I had to fiddle with the access permissions a bit more - so your mileage may vary.

Generally speaking, the instructions to fix the 'Error 1317: Setup Cannot Create Directory' will apply to any program and not just MS Office. So if you see anything related to 'Error 1317: Setup Cannot Create Directory C:\ProgramData\Microsoft\Windows\Start Menu\Programs\some directory name', please give the following instructions a try.

  1.  First, you'll need to open an administrative command prompt so we can override the access permissions. To do so: click Start, then type in "cmd" (no quotes); wait for "CMD.EXE" or "Command Prompt" to appear in the list, then right click and select "Run as Administrator".
  2. Next, highlight the text below using your mouse:

    cd \
    icacls "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" /grant Everyone:(OI)(CI)F /T
    takeown /f "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" /r
    icacls "C:\ProgramData\Microsoft\Windows\Start Menu\Programs" /reset /T
    echo this is a dummy line
  3. Right click the above text, then select "Copy" from the dialogue menu. Next, go to the administrative command prompt you opened in Step #1, and right click in the middle of the window and select "Paste" from the dialogue menu. The text you copied in Step #2 should now be output to the command line.

    Note: if you see a message in the administrative command prompt similar to the following, select "y" for "Yes":

    You do not have permissions to read the contents of directory "C:\ProgramData\Microsoft\Windows\Start Menu\programs".
    Do you want to replace the directory permissions with permissions granting you full control ("Y" for YES, "N" for NO or "C" to CANCEL)? y <-- yes

  4. Now, try and reinstall the program you couldn't previously install due to the "Setup Cannot Create Directory" error.

I hope that helps; however, if you still have problems, you can contact me for additional support - described next.

Additional 1-on-1 Support: From Dennis

If the above instructions are over your head, or, if the above fix didn't work for you, there may be further access permissions that need adjusting which are beyond the scope of this article. In that case, I can help using my remote desktop support service. Simply contact me briefly describing your problem, and I'll get back to you as soon as possible.

Got a Computer Question or Problem? Ask Dennis!

I need more computer questions. If you have a computer question - or even a computer problem that needs fixing - please email me with your question so that I can write more articles like this one. I can't promise I'll respond to all the messages I receive (depending on the volume), but I'll do my best.

About the author: Dennis Faas is the owner and operator of With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the website contact form.

Rate this article: 
Average: 5 (8 votes)


ducktorq_8089's picture

This solution works! Thank you.