TheAppleFreak Posted December 24, 2015 Share Posted December 24, 2015 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. Link to comment Share on other sites More sharing options...
iamtheky Posted December 25, 2015 Share Posted December 25, 2015 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) ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
jaensterr Posted December 28, 2015 Share Posted December 28, 2015 Another simple, but bit ugly way is to use a piece of batch code, you can safly write that in for example the @tempdir Look at our friends of stackoverflowhttp://stackoverflow.com/questions/1894967/how-to-request-administrator-access-inside-a-batch-file Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now