Jump to content

Recommended Posts

Posted

The way I understand it, the issue is less "always run as full admin" and more "I can't elevate my script to full admin because Windows's heuristics doesn't think my application needs full privileges." I could be wrong about this, but that's what I take from it. 

  • Replies 42
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

except for the part where this an admin account named 'Admin' that the other script goes and gets the password ($pw) for...this is no better than actually having the plain text password stored in the script.  Operationally you would be better off creating that user a unique local admin account with which to elevate themselves, and logging when that account is used and for which processes, in this solution everyone is 'Admin'.

$pid = RunAs('Admin', @ComputerName, $pw, 0, $reEXE & ' ' & $tmpBAT, @SystemDir, @SW_SHOW, 8)

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

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
  • Recently Browsing   0 members

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