b1g3vil20 Posted January 11, 2016 Share Posted January 11, 2016 Hi everyone,I'm brand new to using AutoIT and am currently stuck at trying to install software using the RunAs function.I'm trying to run a bat file as an admin and the end result should be a desktop icon, however, this is only happening if I use the credentials of the user that is currently logged in. This is what I'm doing so far:; Script Start - Add your code below here#include <AutoItConstants.au3>$program = "\\share\softwaredeployment\software\program.bat"RunAs("admin", "acme.com", "Forum123", $RUN_LOGON_PROFILE, $program)When I run that script, nothing happens, when I change the credentials to the currently logged on user, it will create the icon.I have tried replacing the logon flag, $RUN_LOGON_PROFILE with the other three variations, (NOPROFILE, NETWORK & INHERIT) but no luck.What am I doing incorrectly?Thank you in advance for your suggestions and help. Link to comment Share on other sites More sharing options...
AdamUL Posted January 11, 2016 Share Posted January 11, 2016 The RunAs function does not run a process with the Admin Token. It only runs it as the requested user. Have a look at this thread for a similar situation to what you are trying to do. Adam 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