Jump to content
Sign in to follow this  
Chris86

#Requireadmin in the middle of the script

Recommended Posts

Chris86

Hi, Is there any other way go let me decide when my script need admin rights? cuz I don't want users to give admin rights to my script each time they run it..

Edited by Chris86

Share this post


Link to post
Share on other sites
Jos

Hi, Is there any other way go let me decide when my script need admin rights? cuz I don't want users to give admin rights to my script each time they run it..

#Requireadmin can be put anywhere in the script, the effect will be the same.

RunAs() is an alternative to perform certain tasks using other credentials.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Chris86

Thanks Jos :) Someone told me that if I don't put #Requireadmin in the beginning of the script then everything would fail

Share this post


Link to post
Share on other sites
Inverted

Wherever you put it, it's the same. The script will require admin privileges each time. So it doesn't really solve your problem.

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
Sign in to follow this  

×