Jump to content

SU in Autoit


cyberguy91
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...