locked
[SOLVED] Windows 7 cmd prompt gives "Access is denied." error for every command RRS feed

  • Question

  • It seems that other than the 'dir' command, every command I run from my dos prompt, I get an "Access is denied." message.  Example:

    C:\Users\aagha>ipconfig
    Access is denied.

    I've checked my UAC settings and made sure they're set to "Never Notify".

    I've also tried to run sfc.exe, but can't:

    C:\Users\aagha>sfc.exe
    Access is denied.

    Finally, I've tried to run cmd.exe as administrator, but no luck.

    The one thing I've noticed is that if I go to cmd.exe's Properties and then the Security tab, I see that TrustedInstaller has Full control, but SYSTEM, Administrators and Users have only:

    • Read & execute and
    • Read

    I've tried to change permissions by editing, but when I do so, I get an "Access is denied" message.

    I've run out of ideas on what else to try and would appreciate the help.


    • Edited by aagha Sunday, April 21, 2013 6:37 AM
    Tuesday, April 9, 2013 6:13 AM

Answers

  • SOLVED!

    The problem was that I had the Personal firewall from Comodo installed.  By uninstalling this, all normal DOS functionality seems to have returned!

    • Marked as answer by tracycai Thursday, April 25, 2013 7:20 AM
    Saturday, April 20, 2013 8:57 PM
  • Right click c:\windows\system32 folder or c:\windows\system32\ipconfig.exe and click Properties. Click on the security tab and check for the permission for Users. Make sure that the Read&execute is allowed.

    Tracy Cai
    TechNet Community Support

    • Marked as answer by tracycai Monday, April 15, 2013 9:15 AM
    Thursday, April 11, 2013 8:14 AM
  • If above steps by Tracy works, you can right click on C: ( the partition having OS) add your account and replace permissions to all the child objects.

    Arnav Sharma | Facebook | Twitter Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Marked as answer by tracycai Monday, April 15, 2013 9:15 AM
    Thursday, April 11, 2013 10:48 AM
  • Hi Tracy -- Sorry for not getting back to you sooner, I was travelling on business.

    I did as you suggested.  Clicked on the C:\windows\system32 folder and went to Properties and clicked on the security tab.  The following Group or user names are listed:

    • CREATOR OWNER
    • SYSTEM
    • Administrators (SunTzu\Administrators)
    • Users (SunTzu\Users)
    • TrustedInstaller

    For each of these, here's what's marked as Permissions:

    • CREATOR OWNER: Special permissions
    • SYSTEM: Special permissions
    • Administrators (SunTzu\Administrators): Special permissions
    • Users (SunTzu\Users): Read & execute, List folder contents, Read
    • TrustedInstaller: List folder contents, Special permissions

    If I do the same and look at ipconfig.exe in the same folder, here's the users that are there:

    • SYSTEM
    • Administrators (SunTzu\Administrators)
    • Users (SunTzu\Users)
    • TrustedInstaller

    Their permissions for this one file are as follows:

    • SYSTEM: Read & execute, Read
    • Administrators (SunTzu\Administrators): Read & execute, Read
    • Users (SunTzu\Users): Read & execute, Read
    • TrustedInstaller: Full control, Modify, Read & execute, Read, Write

    I tried to go to a dos prompt and try ipconfig again, and this is what I got:

    C:\Users\aagha>ipconfig.exe
    Access is denied.

    Here's running the "path" command.  C:\windows\system32 is indeed there:

    C:\Users\aagha>path
    PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\syst
    em32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v
    1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Blu
    etooth Software\syswow64;C:\Program Files (x86)\Common Files\Lenovo;C:\Program F
    iles (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\Lenovo\Access
    Connections\;C:\Program Files\Common Files\Lenovo;C:\Program Files (x86)\Lenovo\
    Client Security Solution;C:\Program Files\Lenovo\Client Security Solution;C:\Pro
    gram Files\jEdit;C:\Program Files (x86)\RSA SecurID Token Common;C:\SWTOOLS\Read
    yApps;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Common Files\M
    icrosoft Shared\Windows Live;C:\Program Files\Common Files\Microsoft Shared\Wind
    ows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Syst
    em32\WindowsPowerShell\v1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Pr
    ogram Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files (x86)\Common F
    iles\Lenovo;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Fi
    les (x86)\Lenovo\Access Connections\;C:\Program Files\Common Files\Lenovo;C:\Pro
    gram Files (x86)\Lenovo\Client Security Solution;C:\Program Files\Lenovo\Client
    Security Solution;C:\Program Files\jEdit;C:\Program Files (x86)\RSA SecurID Toke
    n Common;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\QuickTime\QTSystem\;%JAVA_H
    OME%\bin;%ANT_HOME%\bin;C:\cygwin\bin


    • Marked as answer by aagha Saturday, April 20, 2013 5:31 PM
    Saturday, April 20, 2013 5:31 PM

All replies

  • Is your ID included in Administrators group of the local machine? If no, then try adding and check.

    Also, if the machine in domain or its  in work group.


    Arnav Sharma | Facebook | Twitter Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Tuesday, April 9, 2013 9:07 AM
  • aagha,

    got a lot of questions here, but first, in addition to Arnav's advice, how 'bout providing more info:

      what kind of environment you operatin' in?  this your personal 'puter?  a networked at work computer....what?

      you just get this comp?

      got anything to lose by "wipin' the slate and starting over?

      how long has this been going on?

      who IS the "TrustedInstaller"?  Get with them and have them fix the problem

    Statement/observation:  You're definitely not the admin

    Just need a tad more detail here aagha...

    thanks

     


    horatio

    Tuesday, April 9, 2013 11:19 AM
  • Hi.

    Yes, my id is included in the Administrators group.  When I go to: Control Panel\User Accounts and Family Safety\User Accounts\Change Your Account Type, my id, 'aagha' is listed listed as 'Administrator'.

    Regarding your second question, the machine is in a work group.

    Tuesday, April 9, 2013 4:25 PM
  • Hi.

    • This is my personal computer.  It's networked--hard-wired, into my wireless router.
    • I've had this computer for over 4 years, and commands like 'ipconfig' used to work in the past.
    • Yes, wiping and starting over would take days, if not weeks, to recover.
    • I'm not sure how long this has been going on.  I know all commands from dos used to work, but when I tried ipconfig a few weeks ago, it didn't--and I started getting the access denied.  When it all started is unclear.  I tried disabling firewalls and virus checkers, but to no avail.
    • TrustedInstaller is a Windows process of Windows Modules Installer.

    Thanks for your help.

    Tuesday, April 9, 2013 4:29 PM
  • Please check the following:

    1. Scan your computer with the antivirus.
    2. Create a new user account to test the issue.
    3. Open c:\windows\system32 properties > security tab, check if the Users have the permission to execute the files.


    Tracy Cai
    TechNet Community Support

    Wednesday, April 10, 2013 7:33 AM
  • Thanks Tracy.

    1.  Scanned my computer for viruses: Nothing found.

    2. Created a new user account, made it Admin, and had the same issue when I opened a dos prompt.  Trusted Installer still had Full permissions, and Administrator had same as above.

    3. I'm not sure what you mean.  Open what?

    Thursday, April 11, 2013 2:48 AM
  • Right click c:\windows\system32 folder or c:\windows\system32\ipconfig.exe and click Properties. Click on the security tab and check for the permission for Users. Make sure that the Read&execute is allowed.

    Tracy Cai
    TechNet Community Support

    • Marked as answer by tracycai Monday, April 15, 2013 9:15 AM
    Thursday, April 11, 2013 8:14 AM
  • If above steps by Tracy works, you can right click on C: ( the partition having OS) add your account and replace permissions to all the child objects.

    Arnav Sharma | Facebook | Twitter Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Marked as answer by tracycai Monday, April 15, 2013 9:15 AM
    Thursday, April 11, 2013 10:48 AM
  • Hi Tracy -- Sorry for not getting back to you sooner, I was travelling on business.

    I did as you suggested.  Clicked on the C:\windows\system32 folder and went to Properties and clicked on the security tab.  The following Group or user names are listed:

    • CREATOR OWNER
    • SYSTEM
    • Administrators (SunTzu\Administrators)
    • Users (SunTzu\Users)
    • TrustedInstaller

    For each of these, here's what's marked as Permissions:

    • CREATOR OWNER: Special permissions
    • SYSTEM: Special permissions
    • Administrators (SunTzu\Administrators): Special permissions
    • Users (SunTzu\Users): Read & execute, List folder contents, Read
    • TrustedInstaller: List folder contents, Special permissions

    If I do the same and look at ipconfig.exe in the same folder, here's the users that are there:

    • SYSTEM
    • Administrators (SunTzu\Administrators)
    • Users (SunTzu\Users)
    • TrustedInstaller

    Their permissions for this one file are as follows:

    • SYSTEM: Read & execute, Read
    • Administrators (SunTzu\Administrators): Read & execute, Read
    • Users (SunTzu\Users): Read & execute, Read
    • TrustedInstaller: Full control, Modify, Read & execute, Read, Write

    I tried to go to a dos prompt and try ipconfig again, and this is what I got:

    C:\Users\aagha>ipconfig.exe
    Access is denied.

    Here's running the "path" command.  C:\windows\system32 is indeed there:

    C:\Users\aagha>path
    PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\syst
    em32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v
    1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Blu
    etooth Software\syswow64;C:\Program Files (x86)\Common Files\Lenovo;C:\Program F
    iles (x86)\Common Files\Ulead Systems\MPEG;C:\Program Files (x86)\Lenovo\Access
    Connections\;C:\Program Files\Common Files\Lenovo;C:\Program Files (x86)\Lenovo\
    Client Security Solution;C:\Program Files\Lenovo\Client Security Solution;C:\Pro
    gram Files\jEdit;C:\Program Files (x86)\RSA SecurID Token Common;C:\SWTOOLS\Read
    yApps;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Common Files\M
    icrosoft Shared\Windows Live;C:\Program Files\Common Files\Microsoft Shared\Wind
    ows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\Syst
    em32\WindowsPowerShell\v1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Pr
    ogram Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files (x86)\Common F
    iles\Lenovo;C:\Program Files (x86)\Common Files\Ulead Systems\MPEG;C:\Program Fi
    les (x86)\Lenovo\Access Connections\;C:\Program Files\Common Files\Lenovo;C:\Pro
    gram Files (x86)\Lenovo\Client Security Solution;C:\Program Files\Lenovo\Client
    Security Solution;C:\Program Files\jEdit;C:\Program Files (x86)\RSA SecurID Toke
    n Common;C:\SWTOOLS\ReadyApps;C:\Program Files (x86)\QuickTime\QTSystem\;%JAVA_H
    OME%\bin;%ANT_HOME%\bin;C:\cygwin\bin


    • Marked as answer by aagha Saturday, April 20, 2013 5:31 PM
    Saturday, April 20, 2013 5:31 PM
  • It's interesting.  When I go to the C: drive and click on Properties and go to the Security tab, the only Group or user names listed there are:

    • Authenticated Users
    • SYSTEM
    • Administrators (SunTzu\Administrators)
    • Users (SunTzu\Users)

    Trusted Installer doesn't show up!

    Permissions for each of the above are as follows:

    • Authenticated Users: Special Permissions
    • SYSTEM: Full control, modify, Read & execute, List folder contents, Read, Write
    • Administrators (SunTzu\Administrators): Full control, modify, Read & execute, List folder contents, Read, Write
    • Users (SunTzu\Users): Read & execute, List folder contents, Read

    Saturday, April 20, 2013 5:38 PM
  • SOLVED!

    The problem was that I had the Personal firewall from Comodo installed.  By uninstalling this, all normal DOS functionality seems to have returned!

    • Marked as answer by tracycai Thursday, April 25, 2013 7:20 AM
    Saturday, April 20, 2013 8:57 PM
  • Sir i have proble on this system error 5.

    and i'm forget the administrator password ,so i cann't access the administrator account ...

    & i cann't change password in cmd ....for system error 5.

    i am access the pc by standard user...

    so sir please help me...

    Sunday, June 1, 2014 10:34 AM
  • I encountered the same problem, and it was solved by disabled the security shield 360
    Sunday, October 8, 2017 7:58 AM
  • yf you want to run asfc.exe you need to run cmd as administrator

    menu>cmd>right click in cmd>run as admin

    Saturday, October 21, 2017 5:07 AM