Jump to content
Sign in to follow this  
Lew

Make User account an Admin with logging off

Recommended Posts

Lew

I was wondering if by chance if there was a script that could make a user that is logged in and is apart of the Users Group a local admin with out adding them to the Administrators group and re-logging them back in.

I am an admin on a corporate domain network. Just would like to see if it is possible to run a script under a basic user and it would prompt me for my admin credentials that could make them an admin while the script is running or have it be that anything new that starts runs as the current user with admin rights.

I figured I could at least ask before I give up hope on searching for it.

In advanced, thanks.

Share this post


Link to post
Share on other sites
SKlocke

Use IsAdmin to ask if user has admin rights.

If he has not, open an input box for administrator username and password and then use RunAsWait to execute everything that needs admin privileges.

Or use these two steps in a little starter program that then runs the work program with admin privileges.

On Win7 with UAC and artifical user context some extra steps might be needed.

Share this post


Link to post
Share on other sites
Manko

...and this comes built in to help you when you wish for the current script to automatically ask for credentials for itself...

#RequireAdmin

Yes i rush things! (I sorta do small bursts inbetween doing nothing.) Things I have rushed and reRushed:* ProDLLer - Process manager - Unload viri modules (dll) and moore...* _WinAPI_ProcessListOWNER_WTS() - Get Processes owner list...* _WinAPI_GetCommandLineFromPID() - Get commandline of target process...* _WinAPI_ThreadsnProcesses() Much info if expanded - optional Indented "Parent/Child"-style Processlist. Moore to come... eventually...

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.