The How-To Geek Forums Have Migrated to Discourse


How-To Geek Forums / Windows Vista

(Solved) - run cmd as administrator....

(28 posts)
  • Started 8 years ago by Dcw329
  • Latest reply from Dcw329
  • Topic Viewed 205583 times

Dcw329
Posts: 216

how do you set the cmd to always run as administrator... it wont let me go to properties, run as administrator...

there must be a way... right?

Posted 8 years ago
Top
 
Dcw329
Posts: 216

o ya... and i dont want to have to right click it... i want it to be set for always run as administrator...fyi

Posted 8 years ago
Top
 
jd2066
Posts: 3814

By cmd do you mean cmd.exe the Command Prompt or some command?

Posted 8 years ago
Top
 
ScottW
Posts: 6609

If you are talking about the Command Prompt, I have a shortcut on my desktop for cmd.exe. On that shortcut, I have modified the Advanced properties to enable Run as Administrator. You can also pin such a shortcut to your start menu.

Posted 8 years ago
Top
 
The Geek
Posts: 2059

ScottW is correct. If you want screenshots:

https://www.howtogeek.com/howto/windows-vista/always-start-an-application-in-administrator-mode-on-windows-vista/

Posted 8 years ago
Top
 
whs
Posts: 17584

I find it most practical to have all those "utilities" like Command Prompt in my Quick Launch. From there they are the easiest to access.

Posted 8 years ago
Top
 
ScottW
Posts: 6609

That same shortcut that I created could also be dragged to the Quick Launch bar to use whs's method. Or, it could be created there in the first place. Either way, another advantage of whs's method is the ability to use the Quick Launch hotkeys, Win+1, Win+2, etc. to launch those apps.

Posted 8 years ago
Top
 
Dcw329
Posts: 216

hey... i see the [image] button for htg... but im not sure of the address im suppose to put in to get it to show up... i know how to do it if the pick is online, but how do i do it if its in a folder? when i can do picks, ill show you the problem...(i know how to screen shot... just need to upload the pick)

Posted 8 years ago
Top
 
ScottW
Posts: 6609

To post a picture, it needs to be hosted online. If you have web space of your own you can use that. Most people get an account on a free image hosting site such as http://imageshack.us or http://photobucket.com etc. and upload pictures there. These sites provide a URL to the image and that's what you put in as the link for the Image button.

Posted 8 years ago
Top
 
whs
Posts: 17584

In case you want to use Photobucket, here is the procedure:

1. Create your account at http://photobucket.com/ - real easy
2. Use the folder with your name on it or create a subfolder (recommended). You do that on the left side where it says "New Album" > Save
3.Go to "Upload Images and Videos", somewhere in the middle. Now click on "Choose Files". This will most likely bring up your "Pictures" folder (but you can select another folder). Double click on the file you want to upload. After a few seconds you will see it.
4. If you want to post this picture directly on the Forum, click on IMG Code (last link). If you only want to post the link to the picture, click on Direct link. Note: the thing will get yellow - then you got it in your clipboard (from where you Paste).
5. Now you can paste this into your HTG posting. If you chose IMG, the picture will only show up AFTER you posted. In the posting you will only see the link. If you chose "Direct link", it will just be a link.

Posted 8 years ago
Top
 
Dcw329
Posts: 216

this is what i have... if you look at the compatiblity tab, everything is greyed out... and if you look at the other two pics, The Geek said go to advanced, but neither of the advanced buttons look like what i saw in his pic... what should i do, or what am i not seeing? i must be missing somthing...

Posted 8 years ago
Top
 
whs
Posts: 17584

Go to All Programs > Accessories > Command Prompt > right click on Command prompt > then you should see the scenario in my pic below. Just do 1,2,3 > OK > APPLY > OK.
PS. Next time you snip, save the pic in PNG - That's much better to read than JPG (see my pic)

Posted 8 years ago
Top
 
Dcw329
Posts: 216

ya... after i put my pics up... i went back and reread the comments... somebody said they did it from there desktop... well... i put a shortcut on my desktop and tried it... i get those new tabs...

i tried fiddleing with it for awhile, and i relized, i dont get those options if i rightclick from stardock... but i do if i right click from desktop... and i cant move the shortcut from the desktop to the stardock without it turning back off... im trying now to fiddle with it...

Posted 8 years ago
Top
 
whs
Posts: 17584

Just do what I said above. It does not matter where your shortcuts finally end up. It will work in any case - except when you start the CMD.exe directly (which one normally does not do).
Update: But it does also work with the shortcut on the desktop. So I suppose you are all set.

Posted 8 years ago
Top
 
Dcw329
Posts: 216

here is a pic of my dual screen setup... you can see the stardock on the left... when i right click it i get a differnet properties... and if i change something on the right... nothing happens to the one on the left... i think if i turn UAC off then it should "ungrey" the stuff on compatablity on the right, and i can click "run as administator" and turn it back on... i think i will try it in a minute... but why is it different for one, and the same as yall for the other?

Posted 8 years ago
Top
 
whs
Posts: 17584

I have no idea what happens with dual screen. Sorry, I can't help you here.

Posted 8 years ago
Top
 
Dcw329
Posts: 216

i dont think its the dual screen... i think its the stardock... (the funny looking taskbar on the left)... but if your just not sure, ill just keep messing with it untill somthing happens... thanks for telling me how to add pics... that will help in the future...

Posted 8 years ago
Top
 
jd2066
Posts: 3814

Turning off UAC will not affect that tab. The tab is disabled due to cmd.exe being a Windows componet. This is good because if you could set that then everything that uses cmd.exe like batch files would run as an administrator.
What you want to do is make a shortcut to cmd.exe with that setting somewhere. So just that shortcut runs as administrator. Then remove the current cmd.exe item from the Dock you have and then add the shortcut to the dock.

Posted 8 years ago
Top
 
sourpuss
Posts: 65

You're right...it is Objectdock. I just tried it and you don't get the shortcut options when you add the shortcut to OD. And even if you set the shortcut properties on the desktop to run as admin, you lose it when you move that shortcut to OD. If you just click on it, assuming that the properties stay as set on the desktop, you'll see as soon as the cmd window comes up that you are not running as admin.

I don't know if there's any workaround for that...have you tried Rocketdock or RKLauncher if you really want to run it from a dock? Maybe the properties on one of those docks is different. Actually, I'll check it out and see...I've got both :)

Posted 8 years ago
Top
 
whs
Posts: 17584

You could make your own dock by dragging the folder with the shortcuts into the top or the sides - you have to push it really in.

Posted 8 years ago
Top
 
sourpuss
Posts: 65

Yeah, it doesn't work for either of the other docks. What would the box for adding 'arguments' be for. Could you add special start options there? I'm sooo taking wild guesses, as you can probably tell.

Posted 8 years ago
Top
 
jd2066
Posts: 3814

I'm downloading ObjectDock now. I'll set if I can find a way to get it to run Command Prompt as Administrator.

Posted 8 years ago
Top
 
jd2066
Posts: 3814

Ok. I figured out to do it. ObjectDock by default instead of pointing to the shortcut when one is dragged to the Dock instead just copies the target and uses it's own shortcut.
Here is how to change that:
Open the ObjectDock configuration dialog.
Click "Miscellaneous Options".
Uncheck the box "When a shortcut is added to a dock, point to the target not the shortcut."

Now you can create an Adminstrator Command Prompt shortcut on the Desktop, drag it to the dock and have it open when clicked.
Here is how to do that:
Right click on the Command Prompt icon in the start menu and under Send To click "Desktop (Create Shortcut)".
Right click on the desktop icon and click Properties.
On the shortcut tab click Advanced.
Check "Run As Administrator" and click Ok.
Click the general tab and type "Administrator Command Prompt" as the name.
Click ok.
Now drag the shortcut to the dock.
(My instructions are similar to whs's instructions but differect, mime make a new shortcut instead of messing with the start menu one)

Note: Since ObjectDock is now point to a desktop shortcut you can't remove the desktop shortcut or it won't work. You can hide the icon or store the shortcut in a different folder though.

Posted 8 years ago
Top
 
sourpuss
Posts: 65

Ahhh very good! *clapping*

Posted 8 years ago
Top
 
whs
Posts: 17584

So in fact ObjectDock ends up starting the cmd.exe directly - and there the setting we discussed does not apply (as, I believe, I had said earlier). One more reason I recommend to stick all the "system utilities" into the Quick Launch - that avoids all troubles and is easy to access.

Posted 8 years ago
Top
 
Dcw329
Posts: 216

sweet... thanks so much for taking the time to help me out... i really appreciate it... and its a good thing to know if anyone eles has objectdock... (like sourpuss)

i havnt tried it yet... but im sure it will work... im about to try it now... thanks again!

Posted 8 years ago
Top
 
whs
Posts: 17584

This was a real win/win thread. I think we all learned something. Thanks Dcw329 for bringing it to our attention. And we owe jd for plunging right into it!

Posted 8 years ago
Top
 
Dcw329
Posts: 216

works great! thanks...

thanks whs for showing me how to paste images
thanks sourpuss for helping me confrim the problem was objectdock
thanks jd2066 for completeing the project

(Solved)

Posted 8 years ago
Top
 



Topic Closed

This topic has been closed to new replies.