Jump to content
Sign in to follow this  
cyberguy91

SU in Autoit

Recommended Posts

cyberguy91

I was looking for a Windows equivalent to the linux su command. I found one topic on here, but it is outdated and doesn't work for me.
So, I wrote a small script to emulate the su command.

#NoTrayIcon
#RequireAdmin
Run("cmd.exe", @UserProfileDir)
Exit

This should bring up the UAC prompt if you have UAC enabled, otherwise it should just launch. Also, you can change the "@UserProfileDir" section to whatever directory you want the command prompt to start in, I just usually need it in the profile directory.

Edited by cyberguy91

Share this post


Link to post
Share on other sites
JLogan3o13

Usually Examples do something more than a single line bringing up the command window, especially when the functionality is built into the Run command. Not really showing anything new...

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

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  

×