Sarah2016

Quikc Question: Run As Admin

2 posts in this topic

#1 ·  Posted

Hi,

If the computer is running on a user with administrative account and the user itself shelled an application, will the application have administrative properties by default?

Share this post


Link to post
Share on other sites



#2 ·  Posted

Not necessarily, for example, the following opens command prompt as user, whether you're an Administrator or not.

Run(@Comspec)

Whereas the following opens command prompt same as "Run as Administrator"

#RequireAdmin
Run(@ComSpec)

You can also use something like the following to "Run as Administrator":

ShellExecute(@ComSpec, "/k", "", "RunAs")

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now