Tech – for Everyone

Tech Tips and Tricks & Advice – written in plain English.

Quick Tip: overcome “access denied” in Vista’s Command Prompt

The Vista security feature that’s most effective — and the most annoying — will sometimes prevent the Run and command line tools from doing what you tell them to do. This is (usually) due to the fact that you haven’t told it you’re an Administrator. Note: this technique can be applied to other programs as well.

I overcome this annoyance by creating a desktop shortcut and setting its Properties to “Run as an Administrator”.
Go to Start >Programs and open the Accessories folder. Right-click on, and holding down the right-click, use the cursor to drag the black Command Prompt icon to a vacant area on your descktop. Let go and select (click) “Create shortcut here” from the list of choices.

Now you will have a new, black Command Prompt icon. Right-click on your new icon, and select Properties and click on the Shortcut tab. Now click on the “Advanced” button toward the bottom

shrtprop.jpg

Place a check in the “Run as Administrator” checkbox, and click the “OK” button twice. That’s it!

Now you will be able to accomplish the advanced commands as you expect you should.

Copyright 2007 © Tech Paul, All Rights Reserved.

Share this post :

September 14, 2007 - Posted by | advice, computers, how to, PC, permissions, tech, User mode, Vista, Windows

76 Comments »

  1. There is no black Command Prompt icon in my accesories. So?

    Comment by jo | July 19, 2008 | Reply

    • @ jo what you can do is go in to notepad and type just the word “command” then go save as “.bat” the just click on the .bat file you just made

      Comment by LOL hacked | June 5, 2012 | Reply

      • LOL hacked,
        I am not well versed in writing scripts and batch files, but I do not think that is going to launch an elevated command prompt.

        I did find some PowerShell batch files that can do it…

        Comment by techpaul | June 5, 2012 | Reply

  2. That’s most unusual.

    However, you should be able to get a command prompt by typing “cmd” (no quotes) in the Run dialogue.
    Run is also found in Accessories, and can also be showing in your Start menu.. depending on how your Properties are set.

    Comment by techpaul | July 19, 2008 | Reply

  3. Hey,
    Thanks for your advice. However, I have followed the above steps, but it does not help me at all.
    I even checked the run as administrator option.
    When I try to set a path to the existing path, I am getting the error “Access denied”. Can anyone help me in this?

    Comment by Bharath | September 30, 2008 | Reply

  4. I try to set a path to the existing path” has me a bit confused.
    You might try temporarily turning off the UAC.

    Comment by techpaul | September 30, 2008 | Reply

  5. thanks!!
    it really works

    Comment by charly | October 7, 2008 | Reply

    • Hey i’m having the same problem when executing java commands (java, javac,…} at command prompt. “Access Denied” error message comes out. I’m using Windows XP SP2…Thanx…

      Comment by Jan | June 15, 2009 | Reply

      • Jan,
        XP is not Vista, and Java is not a Windows executable, and a Java Users forum might be a better place to post this question.

        However, in general terms, you might want to check in the executable’s Properties for the path, and vrify you’re running with “Full” Permissions.

        Java’s “error messages” page might be helpful to you, and there is a Help Center there too.

        Good luck.

        Comment by techpaul | June 15, 2009 | Reply

  6. Dear Sir,

    My bro unchecked the read and write access for other user for c and d drive using properties>security>full conrtol for all users. Now i cant use the pc and anly left with option to format my pc which i dont want to

    please help

    Comment by sunkash77 | December 16, 2008 | Reply

    • You say it is your machine, yet your brother modified the User Accounts? (BTW, “Full Control” is the setting that give the group, well, full control..) Why did he do that?
      Are you using Vista? Or, XP?

      All you need to do is log in with an Administrator Account, and reset the Permissions. (On Vista use Ctrl+Alt+Del, twice, to reset the password, if you need to. There are a ton of webpages describing how to log into the Administrator Account in XP). You don’t need to reformat.
      If you get stuck, take the machine into a tech. It’s a quick fix.

      Comment by techpaul | December 16, 2008 | Reply

  7. I’m completely locked out of my system, My brother was a jerk and activated pretty much all the securities in vista.

    The right click, most of the control panal(including user accounts), command prompt to system32 folder, and regedit are all disabled. The hidden adminstrator account is active but the user name and password have been changed.

    Any suggestions besides reformatting?

    Comment by Johnny_Doe | February 18, 2009 | Reply

    • “Johnny Doe”–
      I am bound by ethics, as well as the law, to reply thusly:
      No, you do not need to reformat. Take the machine to the nearest computer tech, convince them the machine belongs to you, and for a very modest fee, they will undo everything your brother did.

      Comment by techpaul | February 18, 2009 | Reply

      • thats just the sort of stupid reply to someones genuine problem that is getting more common in these places. i have the same problem im completely locked out because of a badly written os and the last thing we need is a smart *** like you

        Comment by clark | April 14, 2009 | Reply

        • Clark,
          I can understand your frustration. But I stand by my reply: “when you get in over your head, see a pro.”
          That applies to many things in life.. sometimes, even computers.

          Comment by techpaul | April 14, 2009 | Reply

    • I ran into this with a computer my relative handed me(all of the symptoms). My best answer would be to get MalwareBytes and let it “unlock” everything.

      Comment by Reaper91091 | November 11, 2012 | Reply

      • Reaper91091,
        Hmmm.

        Well, I guess.

        But I neither advise, nor do myself, disabling UAC, enabling admin, or “unlocking” everything, because those security features are there for good reason. Hopefully, the need for an elevated cmd prompt is a very rare event for the average user, and this isn’t a big issue.

        But I have had a few machines where I had to take drastic measures to regain ownership/access to files, so ..

        Comment by techpaul | November 11, 2012 | Reply

  8. Im trying to make a file not read only, and i have vista X64 and for a certain file no matter what i do i keep getting access denied – (file name). I have turned off uac and i gave it full control. Any help?

    Comment by KEn | June 21, 2009 | Reply

    • KEn,
      Sounds to me like you took the right steps.

      Which file? Is it one you created?
      And, which Vista x64 (Home Premium or Ultimate)?

      Comment by techpaul | June 21, 2009 | Reply

  9. Hi all,

    Im running vista andhaving a couple of issues with CMD prompt

    1) when typing NETSEND PCNAME HELLO it does not recognise this command (XP DOES)
    2) when using the Shutdown -i i get the shutdown box come up but after hitting enter i get the error message in CMD Access is denied (5)??? Any help starting to hate Vista

    Comment by Luke | July 11, 2009 | Reply

    • Luke,
      Net send was eliminated in Vista. Microsoft recommends using msg.exe instead (there’s also a free applet), see: http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/17ab8b3c-2320-40a1-a377-aa76fdad7351.

      I suspect, but you do not specify, that you are trying to send the shutdown command to a remote computer…
      I also suspect this is a permission issue. If the command fails with a “System error 5 has occurred. Access is denied.” message, 1) make sure you are logged on using an account that has permission to view the shares on the remote computer.
      2) Need to cache credential: logon the same username and password on both computers or use net net use \\computername /user:username command.
      3) Make sure the Netlogon service is running.

      Comment by techpaul | July 11, 2009 | Reply

  10. thanks Paul for your information ;)you have been a great help!!

    Comment by james | September 1, 2009 | Reply

    • James,
      Thank you for the nice comment.

      Comment by techpaul | September 1, 2009 | Reply

  11. Thank you for a great fix…saved me hours!

    Although, my next problem is that Vista won’t let me run Apache 1 — here’s the response:

    The Apache service is starting..
    The Apache service could not be started

    A system error has occurred.

    System error 1067 has occurred.

    The process terminated unexpectedly.

    any thoughts?

    Comment by kelly | September 20, 2009 | Reply

  12. Great advice! Helped me clean those nasty icons on my desktop! XD

    Comment by win | September 30, 2009 | Reply

  13. Many Thanks. Worked immediately

    Comment by lyndon | October 18, 2009 | Reply

    • lyndon,
      Thank you. Glad I could help out.

      Comment by techpaul | October 18, 2009 | Reply

  14. How about a script (Batch File) set to run via task scheduler

    net stop browser
    net stop server
    net start server
    net start browser

    I get…
    C:\>net stop browser
    System error 5 has occurred.

    Access is denied.

    C:\>net stop server
    System error 5 has occurred.

    Access is denied.

    C:\>net start server
    System error 5 has occurred.

    Access is denied.

    C:\>net start browser
    System error 5 has occurred.

    Access is denied.
    How do I overcome this?

    Thank you.

    Comment by Brad Williams | November 16, 2009 | Reply

    • Brad,
      I believe that you need to set the “Run as administrator” flag in the executable’s Properties..

      Comment by techpaul | November 16, 2009 | Reply

  15. Awesome TUT
    Thankyou
    Merry Christmas

    Comment by Matt | December 10, 2009 | Reply

    • Matt,
      Thank you and the same to you and yours.

      Comment by techpaul | December 10, 2009 | Reply

  16. This worked like a charm. The system was preventing an automatic update of an application package.

    thanks

    Comment by Jan Michael | December 12, 2009 | Reply

    • Jan Michael,
      Glad I could help.

      Comment by techpaul | December 12, 2009 | Reply

  17. Thank you for the ‘run as administrator’ tip.

    Comment by Anonymous | December 18, 2009 | Reply

  18. Hello Sir,
    I followed the above mentioned steps to run my command prompt as administrator. But when I check the ‘Run as administrator’ check box and press ‘Ok’ and then again go to the ‘Advanced’ (under shortcut) the check box is automatically unchecked. This is not solving my basic problem of ‘Access is denied’. Please suggest!

    My Best
    Anky

    Comment by anky | December 20, 2009 | Reply

    • anky,
      If I understand you correctly.. the check (telling the executable to Run as administrator) is somehow, mysteriously, un-checking itself.

      The only times I have encountered that kind of behavior is on machines running pirated (aka “cracked”) copies of Windows. Which is illegal and I do not support nor condone.

      However, I do not know if that applies to you, so I will suggest that you try creating a new shortcut directly from cmd.exe, which is located in Windows\System32. Right-click, and use the “Create shortcut” wizard to do so.
      But, you may have to manually launch into Administrator mode each time you need elevated privileges.
      And as I wrote in answers above, you might also try temporarily turning of the UAC.

      Comment by techpaul | December 20, 2009 | Reply

  19. thanks for your article, my customer met this kind problem, and asked me to solve, but I have no visita installed, after googled, I got here.

    Comment by rubypdf | December 22, 2009 | Reply

  20. :ok, I have Windows Vista ; Im on the guest acct. and is there anyway to hack into the admin user? I cant download nothing or anything, it always need permission. The password hint is cat but I tried all types of cats to get in; Also, I have no USB; What can I do? Also, I tried Command Prompt and thats dont work. It says ” Access Denied ” everytime I try to do net user ( what name goes here )

    Comment by Dre | December 24, 2009 | Reply

    • Dre,
      Please read my answers to Johnny Doe and sunkash77, above.

      Comment by techpaul | December 24, 2009 | Reply

  21. my windows vista is broken and i can only work command prompt from task manager (from ctrl+shift+esc) so how can i run as administrator to uninstall vista from the command prompt?

    Comment by jordie | January 8, 2010 | Reply

    • jordie,
      I am scratching my head due to the phrasing of your question..
      Let me ask you this.. did you try restoring Vista to working condition with System Restore? (from cmd.exe: C:\windows\system32\restore\rstrui.exe)
      Can you browse the file system? (Say, by using Run (explorer.exe)) If so, navigate to C:\WINDOWS\System32, and rt-click on cmd.exe.
      Can you use the Search feature of the Vista installation? If so, click Start and in the Search window type “cmd” (no quotes).
      # Hold CTRL and SHIFT.
      # Press ENTER.
      # Confirm the Windows Vista UAC dialog box.
      That will give you an elevated command prompt.

      Uh.. I will wish you good luck, and also say that I get the feeling you may want to consider professional assistance.

      Comment by techpaul | January 8, 2010 | Reply

  22. hi Paul,

    your article is brillient.
    keep it up

    cheers

    Comment by kavindu ratnayake | January 11, 2010 | Reply

    • kavindu ratnayake,
      I thank you for your support. I hope you will visit often.

      Comment by techpaul | January 12, 2010 | Reply

  23. thanks for this . its a life saver

    Comment by Eniola | January 16, 2010 | Reply

  24. hey! it was useful.. Thanx!
    you can also goto Start and type cmd
    then right click from there and click on run as administrator. That works too.. I could delete sm unwanted .exe files wch were hidden. Thanx once agn

    Comment by vinsome | April 16, 2010 | Reply

    • vinsome,
      Yes, you are correct (if you meant “type cmd” into the Search bar just above the Start button, as I’m sure you did).

      You could also navigate to c:\Windows\System32 and find the cmd.exe, rt-click, etc..

      The concept is “elevating privilege”, and this article focuses simply on the command prompt, but is applicable elsewhere as well.

      Thanks for adding that reminder.

      Comment by techpaul | April 16, 2010 | Reply

  25. I did this and it still says that. Is this because i’m not an administrator?

    Comment by Zach | May 16, 2010 | Reply

    • Zach,
      Well, that sort of depends. But strictly speaking, no. When you right-click on an executable and select “Run as administrator” you are ‘elevating’ to that level (unless you are being asked for the Username/Password of an admin acct, and cannot provide them).

      I would have to see what you are trying to do (Permissions can get complicated). For example, in some cases, if the file you are trying to work with has been copied over from another machine, you may have to “unblock” it first.

      What I might suggest is using a search engine, and entering the exact error message.

      Comment by techpaul | May 16, 2010 | Reply

  26. Thanks Paul, that was just the article I needed to read to fix my problem.

    Comment by james | June 9, 2010 | Reply

  27. Thanks!

    Comment by Mikael | June 16, 2010 | Reply

  28. to make it more easier.in start menu type cmd.when command prompt appear,right click.add as administrator,then it just go smoothly….hope it helps

    Comment by randsK | May 5, 2011 | Reply

  29. i am on a network where i have no/limited privileges. how can i find the ip of my server and shut it down from just being a client

    Comment by alex | May 5, 2011 | Reply

    • alex,
      It would be pretty irresponsible of me to answer a question like that on a public venue.

      That is the kind of thing a hacker wanting to do a Denial of Service would want to know.

      I am available for consulting at my business website, here, Aplus Computer Aid

      Comment by techpaul | May 5, 2011 | Reply

  30. i wanted to thank you for this post – i just spent 2 days trying to get msconfig to turn off a program from starting up. I kept getting an error “incorrect parameter”. After using my new shortcut as you directed, I was able to uncheck the box & click apply without any errors! This also worked for net stop & services.msc – none of these programs would work before! Thank you!

    Comment by Melissa S | September 11, 2011 | Reply

    • Melissa S,
      Thank you for taking the time to let me know you found my website useful.

      (There are over 1,500 articles here..)

      Comment by techpaul | September 11, 2011 | Reply

  31. I tried to apply admin rights for the “cmd.exe” file, and also the entire System32 folder AND Windows folder.

    All access/permissions to my account and to administrator. (And my user is the only one, on my computer, and also Administrator)

    But it keeps saying ACCESS DENIED. Even when I try to just “help” in cmd dialog. “ipconfig”, “ipconfig /all” etc. etc. ANNOYING! I have searched Google completely emty now, without any suggestions that helped. I even tried de-activate UAC and restart. Still the same “ACCESS DENIED”.

    - I have got Windows 7 Home Premium (32bit).
    - WHEN I AM IN SAFE MODE – THE CMD WORKS JUST FINE WITHOUT “ACCESS DENIED” WHEN TRYING TO RUN COMMANDOS.

    Comment by MC | September 21, 2011 | Reply

    • MC,
      I understand your frustration, but please, no swearing here. (And there’s no need for shouting..)

      You have not hired me, and I am not looking at your machine. But I can tell you that – yes, something is wrong with your machine: you should not even need an elevated (aka “Run as administrator”) command prompt to do an ipconfig. (And no, you generally speaking should not muck around with the properties in the Windows folder). What the exact “wrong” is, could be many things — each with a different “fix”.

      The fact that you do not experience the issue while in Safe Mode leads me to suspect that some installed program (or Service) is either not properly installed or causing problems (a conflict). To find out which one, follow the procedure outlined here, How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7.

      Should you be unable to resolve you problems by this procedure, you basically have two options: re-Install Windows (Google “repair install”) or have a professional tech look at it (hire tech support). In this case, you might be well advised to contact Microsoft Support (the links are at the bottom of the page referenced above).

      Good luck!

      Comment by techpaul | September 22, 2011 | Reply

  32. Does this work even if you aren’t an administrator? I am, but I’m curious.

    Comment by Alix | December 29, 2011 | Reply

    • Alix,
      “Run as” (Administrator) works on locally logged in accounts (basically, if you’re sitting at the computer typing).

      Try it.

      Comment by techpaul | December 29, 2011 | Reply

  33. RESOLVED!!!! CMD COMMANDS ACESS DENIED!!! UNINSTALL YOUR FIREWALL AND INSTALL AGAIN IT WORKS FINE! I HAVE IT THE SAME PROBLEM WITH NETSTAT COMMAND ACCES DENIED uninstall firewal, and install again! it WORKS :)))))))

    Comment by Miki | January 13, 2012 | Reply

  34. uninstall with revo uninstaller! Clean all remaining files, ONLY THE BOLDED ONES, or Uninstall normal, in windows installer! Install again your firewall and it comes back again!!!!:p

    Comment by Miki | January 13, 2012 | Reply

    • Miki,
      I am not sure what specific problem you encountered (nor on what OS) nor why you were using netstat, but this article is about “elevated privileges”, and creating a Desktop shortcut so you do not have to right-click > Run as administrator all the time.

      While I appreciate your share.. and will leave it up and visible.. I do not think uninstalling the firewall is going to be appropriate in most instances (and only can say, consider it a ‘method of last resort’).

      Comment by techpaul | January 13, 2012 | Reply

  35. [...] over the past 4 years would earn this ‘win’.. but again I just looked at the stats. Quick Tip: overcome “access denied” in Vista’s Command Prompt The Vista security feature that’s most effective — and the most annoying — will sometimes [...]

    Pingback by 7 Links Challenge « Tech – for Everyone | February 1, 2012 | Reply

  36. Ok dude I did what u said and its still says “access denied ” what do I do??! :/

    Comment by bluford | February 1, 2012 | Reply

    • bluford,
      While I understand your frustration, I don’t think there’s any need to be rude…

      For me to answer your question, I would have to know what it is you are trying to do, and see the steps you’ve taken, and where/when the error occurs… a netstat, for example. (Something you could hire me to do..)

      As a “general answer”, I can only suggest trying to – temporarily – turn off the UAC to complete the command.
      (I have not posted how to do that here, but enough other sites have that you won’t have any trouble locating a How To.)

      Comment by techpaul | February 1, 2012 | Reply

  37. I am trying to fix a program that wont open in vista (MetaCreations Painter 5.5), and have a fixer which I have downloaded. However, using cmd as administrator or as user, it still wont let me type in C:\Program Files prompt to carry out this fix. Please can you help?

    Comment by neecysweet | April 15, 2013 | Reply

    • neecysweet,
      Um, I think that program is for Macs, and I doubt very much there’s a “download” that will fix that incompatibility (Windows vs Mac). But I also see a “web editiom”, from roughly 1998, and maybe that’s what you’re trying to use? If so, you (probably) want to re-Install it using “compatibility mode”.

      Even though this How To says “Windows 7″ and “games”, it is the basic steps for getting old programs to run on newer operating systems. (When that’s even possible. Sometimes software gets too old, and you simply need to acquire a newer program/game.) Here’s the link: Windows 7 – Old Games Won’t Play.. Help! (Updated) 6 Methods For Getting Old Programs To Run On New Computers

      I use Paint.net for my advanced image editing. It’s free.

      Comment by techpaul | April 15, 2013 | Reply

      • Thanks so much for your help I will try the Old Games ….. This program was really special as it allowed you to draw in pencil, oils, and other media very realistically. For an artist nothing has been like it since!

        Comment by neecysweet | April 16, 2013 | Reply

  38. Hi I managed to open Painter5.5 in compatability mode!!!!!!!!!!!!!
    Thanks so much.

    Comment by neecysweet | April 16, 2013 | Reply

    • neecysweet,
      Glad I could help out.

      I do not have much knowledge of the digital artist’s software, (other than photography) but you might want to take a look at these items:

      * http://drawing-software-review.toptenreviews.com/

      * http://www.drawingcoach.com/free-drawing-software.html

      From that second site:

      “… then DrawPlus might be exactly what you’re looking for. You can grab version 4 of their professional software for totally free. This version is slightly toned down from their most recent version of DrawPlus. What this means is that you can get most of the tools and features that are available in the current version for no cost at all – it’s totally free, and if you later decide that you really like using this software you can grab the newest version with all of the bells and whistles for only cost you 10 bucks.”

      Comment by techpaul | April 16, 2013 | Reply

  39. Thank you so much i was able to free 382GB all i needed was the administrator approval. Thanks again.

    Comment by jey | May 5, 2013 | Reply

    • jey,
      I get a bit nervous when someone tells me they freed-up that much (and need admin level to do it)…

      Comment by techpaul | May 5, 2013 | Reply

  40. AWESOME!!! Thank you so much!!!

    Comment by Forrest | January 1, 2014 | Reply

    • Forrest,
      I’m glad you found my article helpful.

      Comment by techpaul | January 1, 2014 | Reply


Post your Comment/Question

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 200 other followers

%d bloggers like this: