daremo Posted September 13, 2006 Share Posted September 13, 2006 Recently I've been having problems with IsAdmin() It started happening after I installed Autoit 3.2.0.1 Here is a simple RunAsSet program: RunAsSet($admin, @Computername, $password) If IsAdmin() Then Msgbox(0, "Status", "Admin Rights Detected") Else Msgbox(0, "Status", "Admin Rights Not Detected") Endif RunAsSet() When I run this program...It always pops up that Admin Rights are Not Detected. Even when it's the correct administrator rights. I've reinstalled previous versions and it still occurs. I didn't have this problem before I installed Autoit 3.2.0.1 Link to comment Share on other sites More sharing options...
blademonkey Posted September 13, 2006 Share Posted September 13, 2006 (edited) Recently I've been having problems with IsAdmin() It started happening after I installed Autoit 3.2.0.1 Here is a simple RunAsSet program: RunAsSet($admin, @Computername, $password) If IsAdmin() Then Msgbox(0, "Status", "Admin Rights Detected") Else Msgbox(0, "Status", "Admin Rights Not Detected") Endif RunAsSet() When I run this program...It always pops up that Admin Rights are Not Detected. Even when it's the correct administrator rights. I've reinstalled previous versions and it still occurs. I didn't have this problem before I installed Autoit 3.2.0.1 From what i understand it should not have worked at all for you. Runasset works on Run() and Runwait() commands. it will work if you make two files 1. runas.au3 2. isadmin.au3 in the runas put your runaset statement and run the compiled isadmin.au3 1. runas RunAsSet("account","domain", "password") RunWait("isadmin.exe") RunAsSet() 2. isadmin If IsAdmin() Then Msgbox(0, "Status", "Admin Rights Detected") Else Msgbox(0, "Status", "Admin Rights Not Detected") Endif that worked for me. let me know. -Blademonkey Edited September 13, 2006 by blademonkey ---"Educate the Mind, Make Savage the Body" -Mao Tse Tung Link to comment Share on other sites More sharing options...
Developers Jos Posted September 13, 2006 Developers Share Posted September 13, 2006 (edited) I've reinstalled previous versions and it still occurs. I didn't have this problem before I installed Autoit 3.2.0.1Doubt that....RunAsSet() sets the credentials for Run() andRunWait() NO other functions.You will have to re-launch your script with the New Credentials before ISAdmin() will "work" correctly for you. Edited September 13, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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