Jump to content

shortcut "Run as administrator" checkbox is disabled


Recommended Posts

Guest John A Grandy
Posted

I right-click on a .sln ( Visual Studio solution file ) to "Send to >

Desktop ( create shortcut )" ...

 

However, on my shortcut, right-click Properties > Advanced reveals that the

"Run as administrator" checkbox is disabled ...

 

How to create a shortcut that "Runs as administrator" the target executable

?

Posted

"John A Grandy" <johnagrandy@g-mail-dot-com> wrote in message

news:eeVmFs7fJHA.5724@TK2MSFTNGP02.phx.gbl...<span style="color:blue">

>I right-click on a .sln ( Visual Studio solution file ) to "Send to >

>Desktop ( create shortcut )" ...

>

> However, on my shortcut, right-click Properties > Advanced reveals that

> the "Run as administrator" checkbox is disabled ...

>

> How to create a shortcut that "Runs as administrator" the target

> executable ?</span>

 

 

Is a .sln file an executable?

 

--

Asking a question?

Please tell us the version of the application you are asking about,

your OS, Service Pack level

and the FULL contents of any error message(s)

Guest Sam Hobbs
Posted

"Gordon" <gordonbparker@yahoo.com.invalid> wrote in message

news:e%23upxPMgJHA.1184@TK2MSFTNGP04.phx.gbl...<span style="color:blue">

> "John A Grandy" <johnagrandy@g-mail-dot-com> wrote in message

> news:eeVmFs7fJHA.5724@TK2MSFTNGP02.phx.gbl...<span style="color:green">

>>I right-click on a .sln ( Visual Studio solution file ) to "Send to >

>>Desktop ( create shortcut )" ...

>>

>> However, on my shortcut, right-click Properties > Advanced reveals that

>> the "Run as administrator" checkbox is disabled ...

>>

>> How to create a shortcut that "Runs as administrator" the target

>> executable ?</span>

>

>

> Is a .sln file an executable?</span>

 

 

I did not ask the question but I will say that it is not. A sln is a file

with Visual Studio (VS) projects in it. Projects of course has source code

file names and build options. So a sln file is associated with VS in the

same manner that a doc file is associated with Word.

Guest Sam Hobbs
Posted

I have used VS since before it was Visual Studio; that is, I used the

Microsoft C compiler before it became Visual C++ and Visual C++ before it

was a part of Visual Studio. I have never used the Administrator account for

any programs except for a few projects that require Administrator privileges

or at least elevated privileges. Unless you are developing a project you are

sure you need Administrator privileges for then don't use Administrator

privileges. You might have to add Debug privileges to your account (user id)

or use a different account that does have it, but don't use an Administrator

account unless you are sure you must.

 

Also, the MSDN says you must use Administrator privileges for some of the

samples; I think it is the Northwind samples. Probably that is due to the

location in Program Files. You can eliminate that requirement; do something

such as copy the files elsewhere or change the security for the relevant

directories. Probably copying the files is the best solution but I think

there are some setup properties that will specify the Program Files

location. Go to the MSDN forums for help with that. Use the Help menu to

find the MSDN forums.

 

If you must use Administrator privileges, then you can execute VS as an

Administrator, but as Gordon's reply implies, you probably (I am not sure)

cannot specify that a solution file must be opened (it is not actually

executed) using Administrator privileges.

 

I get the impression you have a lot to learn; you probably need a good book

and if you ask a question in a MSDN forum without using available resources

such as reading the documentation and reading books, you will soon be told

in a MSDN forum that that is what you need to do.

 

 

"John A Grandy" <johnagrandy@g-mail-dot-com> wrote in message

news:eeVmFs7fJHA.5724@TK2MSFTNGP02.phx.gbl...<span style="color:blue">

>I right-click on a .sln ( Visual Studio solution file ) to "Send to >

>Desktop ( create shortcut )" ...

>

> However, on my shortcut, right-click Properties > Advanced reveals that

> the "Run as administrator" checkbox is disabled ...

>

> How to create a shortcut that "Runs as administrator" the target

> executable ?</span>

Guest Jack the Ripper
Posted

John A Grandy wrote:<span style="color:blue">

> I right-click on a .sln ( Visual Studio solution file ) to "Send to >

> Desktop ( create shortcut )" ...

>

> However, on my shortcut, right-click Properties > Advanced reveals that

> the "Run as administrator" checkbox is disabled ...

>

> How to create a shortcut that "Runs as administrator" the target

> executable ?</span>

 

You cannot set it on a .sln file for VS, as it's not an executable file.

If you need to Run As Administrator with VS for a VS solution within the

VS IDE, then you set the Run As Administrator on the VS short-cut that

points to the location below. That would be the icon that looks like an

8 turned on its side, which is the VS short-cut icon and using the

Advanced button to permanently set configuration.

 

"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"

 

You start VS up off of its short-cut, it's always set to Run As

Administrator and you create new a project, solution or Web site or open

as existing one, then you have the power of using VS with Run As

Administrator.

 

You right-click an exe that was complied/built in the bin directory of

a VS solution and send the short-cut to the desktop, then you can set

Run As Administrator on that exe.

Guest Sam Hobbs
Posted

"Jack the Ripper" <Jack@Ripper.com> wrote in message

news:OwHA4pVgJHA.4556@TK2MSFTNGP03.phx.gbl...<span style="color:blue">

> John A Grandy wrote:<span style="color:green">

>> I right-click on a .sln ( Visual Studio solution file ) to "Send to >

>> Desktop ( create shortcut )" ...

>>

>> However, on my shortcut, right-click Properties > Advanced reveals that

>> the "Run as administrator" checkbox is disabled ...

>>

>> How to create a shortcut that "Runs as administrator" the target

>> executable ?</span>

>

> You cannot set it on a .sln file for VS, as it's not an executable file.</span>

 

As I also said.

<span style="color:blue">

> If you need to Run As Administrator with VS for a VS solution within the

> VS IDE, then you set the Run As Administrator on the VS short-cut that

> points to the location below.</span>

 

Most projects don't need that, but I know that many developers do that.

<span style="color:blue">

> You right-click an exe that was complied/built in the bin directory of a

> VS solution</span>

 

Yes, if it is a C# project. For a C++ project the Debug and Release

directories are in the project directory (by default). I think VB also does

not use the bin directory for any projects (by default).

<span style="color:blue">

> send the short-cut to the desktop, then you can set Run As Administrator

> on that exe.</span>

 

If VS is run as an Administrator, then that is probably not necessary for

debugging/testing purposes. Anything executed by VS will also run as an

Administrator. Most executables won't need elevated privileges and if they

do an experienced programmer should attempt to require the least privileges

necessary. There is a lot to learn so I can understand that someone

beginning to learn would take the easy route of using Administrator

privileges.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...