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
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 : | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Related
September 14, 2007 - Posted by techpaul | advice, computers, how to, PC, permissions, tech, User mode, Vista, Windows
78 Comments »
Post your Comment/Question Cancel reply
• About Tech Paul
I am a Retired computer & network technician. I used to think the machines were pretty cool. Now I don’t.
They’re anything but.
I regularly posted how-to’s and tricks & tips and general computing advice here starting in 2007. (Use the Search tool to find answers. But be aware, many are rather dated.) Sometimes I answered (your) specific questions in an article if I believed the answer was generally helpful to “everyone”. All the writing you see was my own, typos and all. There always is/was an implied “IMHO” in what you see here.
Note: You are responsible for using this blog and its content. I am in no way liable for any losses caused by user error, viruses and/or other malware, hardware or software failure, or any other conceivable reason.
-
Recent Posts
- Merry Christmas
- Just one reason I walked away..
- Use a cellphone? Read this
- A great How To guide for Online Privacy
- “Medicaid Database Department” phone scam
- Yet another major theft..
- How to erase yourself from the Internet
- Accept these two realities
- Remove yourself from people search sites and erase your online presence
- 12 Simple Steps..
Blogroll
- * 100 Incredibly Useful and Interesting Web Sites
- * 15 Mobile Security Tools (smart phones/tablets)
- * AnandTech
- * Best Antivirus 2018 (comparison)
- * Best Free Antivirus 2018 (comparison)
- * Best Free Software
- * Best Internet Security Suites 2016
- * CNet's Security & Antivirus Center
- * Cult of Mac
- * CyberSafe (Kids) – How To Talk To Your Kids (Video Learning)
- * How to erase yourself from the Internet
- * How to remove yourself from Internet search results and hide your identity
- * How To Stay Anonymous Online
- * iLounge
- * Laptop Magazine (part of Tom's Guide)
- * Online Safety and Privacy Education
- * Paul Thurrott's SuperSite for Windows
- * Practical advice for greater online safety
- * Practical Advice for Parents: Computer Use
- * Pulp Tech
- * startpage (the world's most private search engine)
- * The Verge
- * TNW (The Next Web.com)
- * TWiT.TV
- * What's On My PC?
- * Z – MORE READING RECO'S
- How to stop Google from tracking you
Visitors to date
- 4,161,519
-
-
Pages
Recent Comments
Previous Tips & Answers (aka Search This Site)
-
Or use keyword(s)
A Winner’s Blueprint for Achievement
BELIEVE while others are doubting.
PLAN while others are playing.
STUDY while others are sleeping.
DECIDE while others are delaying.
PREPARE while others are daydreaming.
BEGIN while others are procrastinating.
WORK while others are wishing.
SAVE while others are wasting.
LISTEN while others are talking.
SMILE while others are frowning.
COMMEND while others are criticizing.
PERSIST while others are quitting.~ William Arthur Ward
There is no black Command Prompt icon in my accesories. So?
LikeLike
@ 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
LikeLike
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…
LikeLike
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.
LikeLike
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?
LikeLike
“I try to set a path to the existing path” has me a bit confused.
You might try temporarily turning off the UAC.
LikeLike
thanks!!
it really works
LikeLike
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…
LikeLike
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.
LikeLike
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
LikeLike
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.
LikeLike
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?
LikeLike
“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.
LikeLike
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
LikeLike
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.
LikeLike
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.
LikeLike
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 ..
LikeLike
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?
LikeLike
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)?
LikeLike
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
LikeLike
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.
LikeLike
thanks Paul for your information ;)you have been a great help!!
LikeLike
James,
Thank you for the nice comment.
LikeLike
[…] https://techpaul.wordpress.com/2007/09/14/quick-tipovercome-access-denied-in-vistas-command-prompt/ […]
LikeLike
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?
LikeLike
Kelly,
I found this (scroll down to question #13) which may help.
http://apache.active-venture.com/faq-errors.html
But a more complete resource is here; Running Apache for Windows as a Service.
LikeLike
Great advice! Helped me clean those nasty icons on my desktop! XD
LikeLike
Many Thanks. Worked immediately
LikeLike
lyndon,
Thank you. Glad I could help out.
LikeLike
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.
LikeLike
Brad,
I believe that you need to set the “Run as administrator” flag in the executable’s Properties..
LikeLike
Awesome TUT
Thankyou
Merry Christmas
LikeLike
Matt,
Thank you and the same to you and yours.
LikeLike
This worked like a charm. The system was preventing an automatic update of an application package.
thanks
LikeLike
Jan Michael,
Glad I could help.
LikeLike
Thank you for the ‘run as administrator’ tip.
LikeLike
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
LikeLike
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.
LikeLike
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.
LikeLike
: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 )
LikeLike
Dre,
Please read my answers to Johnny Doe and sunkash77, above.
LikeLike
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?
LikeLike
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.
LikeLike
hi Paul,
your article is brillient.
keep it up
cheers
LikeLike
kavindu ratnayake,
I thank you for your support. I hope you will visit often.
LikeLike
thanks for this . its a life saver
LikeLike
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
LikeLike
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.
LikeLike
I did this and it still says that. Is this because i’m not an administrator?
LikeLike
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.
LikeLike
Thanks Paul, that was just the article I needed to read to fix my problem.
LikeLike
Thanks!
LikeLike
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
LikeLike
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
LikeLike
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
LikeLike
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!
LikeLike
Melissa S,
Thank you for taking the time to let me know you found my website useful.
(There are over 1,500 articles here..)
LikeLike
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.
LikeLike
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!
LikeLike
Does this work even if you aren’t an administrator? I am, but I’m curious.
LikeLike
Alix,
“Run as” (Administrator) works on locally logged in accounts (basically, if you’re sitting at the computer typing).
Try it.
LikeLike
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 :)))))))
LikeLike
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
LikeLike
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’).
LikeLike
[…] 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 […]
LikeLike
Ok dude I did what u said and its still says “access denied ” what do I do??! :/
LikeLike
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.)
LikeLike
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?
LikeLike
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.
LikeLike
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!
LikeLike
Hi I managed to open Painter5.5 in compatability mode!!!!!!!!!!!!!
Thanks so much.
LikeLike
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:
LikeLike
Thank you so much i was able to free 382GB all i needed was the administrator approval. Thanks again.
LikeLike
jey,
I get a bit nervous when someone tells me they freed-up that much (and need admin level to do it)…
LikeLike
AWESOME!!! Thank you so much!!!
LikeLike
Forrest,
I’m glad you found my article helpful.
LikeLike
What if is asking me for admins password and i dont remember it?
LikeLike
Minnie,
Well… that’s not good. An Admin Password is the key to the castle.
If you set one, then forgot it, take the machine to a tech, who should be able to reset it for you for a very modest fee.
LikeLike