Guest itdsys Posted November 23, 2004 Share Posted November 23, 2004 We use a regular account for day to day operations, and have admin accounts for security functions (same log in with "adm" suffix). I got bothered by logging completely off (the run as... feature does not work on Windows Explorer) so I found a method on the internet for switching user context by closing the explorer process and reopening it. I then programmed that method into the attached script.Change "OurDomain" to your domain name. I have found it VERY handy.Tested on W2K and XP.If anyone can tell me why ProcessClose("explorer.exe") doesn't work the second time around on an XP -- I would greatly appreciate it.LareenSwitch_to_Admin_User.au3 Link to comment Share on other sites More sharing options...
this-is-me Posted November 23, 2004 Share Posted November 23, 2004 Security issues. ProcessClose cannot close a process from another user with the same security as the original user. See the following metaphor: x is run by user x kills explorer that was started by user x runs explorer with admin rights x kills trys to kill explorer admin with user rights can't possibly work. What you can do is rerun your script in admin rights, then run explorer and kill explorer from your script in admin rights. Who else would I be? Link to comment Share on other sites More sharing options...
GaryFrost Posted November 23, 2004 Share Posted November 23, 2004 seems like it would be easier to use the RunAsSet SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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