Jump to content
Sign in to follow this  
Edifice

#requireadmin

Recommended Posts

Edifice

Okay, so I need #requireadmin to use run("something inside of C:\Windows") on windows vista, but do I need a special flag on the run("") command to run it as an administrator?

Share this post


Link to post
Share on other sites
Catdaddy

I might be misinterpreting but I believe #requireadmin ensures that the script will ONLY run if the person who executes it has admin privileges. If there is a chance that your user does not have admin privileges you could use RunAs().

Share this post


Link to post
Share on other sites
Edifice

yes, and it also activates UAC in vista - which is essentially nessecery for me because I am moving stuff around in @Windowsdir, but my question is:

Do I need to flag my Run("") in some special way to activate admin rights for that particular run or do my little .exe have to admin rights already because of the #requireadmin at the top of the code?

Just wondering :)

Share this post


Link to post
Share on other sites
Catdaddy

Ah, I see. Sorry. Unfortunatly, it's been a while since I've messed with UAC as it was the first thing I turned off when I installed Vista.

Share this post


Link to post
Share on other sites
Edifice

I hear you.

Unfortunatly, I am currently creating a program to fix the most common bugs in windows update, and I do not have that option, as the thought is the program should be able to run on as many computers as possible.

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  

×