Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have written as small .cmd file to be executed as an administrator. I am trying to set its options as 'Run as Administrator' but the check box is not accessible.

Run As Administrator

Why? How to solve this issue? I am administrator on my PC (Windows 7).

share|improve this question

migrated from Sep 21 '11 at 18:40

This question came from our site for system and network administrators.

up vote 3 down vote accepted

Create a Shortcut to the .CMD you want to launch (Right-click-->Create Shortcut, or drag-drop with Alt pressed)

Go into the shortcut's Properties-->Shortcut Tab-->Advanced-->Check-mark Run as Administrator

Then launch with the Shortcut instead.

share|improve this answer
Thanks. It did the trick. For the records: I had to create a 'set location=C:/Users/etc...' variable in my .cmd and use it with each command to make it work. – JVerstry Sep 21 '11 at 19:47
Glad it worked. Have you considered setting the environment variable permanently instead? Check out SetX, and/or this question: how to set path environment variable amongst others, for some info on that. :) – Ƭᴇcʜιᴇ007 Sep 21 '11 at 20:02
The thing is that I may need to modify it in the future and it is only used in the .cmd. It's not really necessary to make it global (in my case). – JVerstry Sep 21 '11 at 20:27

runas might come to some use for you

share|improve this answer
Keep in mind runas only elevates commands if you use the builtin Admin account's credentials and you have autoapproval mode on. Otherwise this will fail due to UAC. – surfasb Sep 21 '11 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .