instabin Posted September 9, 2009 Share Posted September 9, 2009 (edited) I'm trying to run a program that need to be run as administrator but I can figure out how to keep the users network drives after the autoit executes the runas command. I have tried the flags 1 - 4 Edited September 9, 2009 by instabin Link to comment Share on other sites More sharing options...
FireFox Posted September 9, 2009 Share Posted September 9, 2009 (edited) I'm trying to run a program that need to be run as administrator but I can figure out how to keep the users network drives after the autoit executes the runas command.I have tried the flags 1 - 4Maybe you can use the forum search engine ? (like set privilege keywords)Cheers, FireFox. Edited September 9, 2009 by FireFox Link to comment Share on other sites More sharing options...
instabin Posted September 9, 2009 Author Share Posted September 9, 2009 I have tried searching the forms but have not found anything to help me. Link to comment Share on other sites More sharing options...
dot45 Posted September 9, 2009 Share Posted September 9, 2009 the way i do it is get the current mappings, save that to a variable, then at the end remap all of the drives after it exits from the runas portion of the script. Tools I've Created & Shared[/url][url="http://www.autoitscript.com/forum/index.php?showtopic=97177&st=0&p=698665&hl=printer&fromsearch=1&#entry698665"]Printer Migration Tool Link to comment Share on other sites More sharing options...
ajundra Posted September 9, 2009 Share Posted September 9, 2009 you can't keep the network drives as the command is executed as a different user with his own user profile and his own drives. either run the application directly from the network share or copy it over to a temporary directory. you can test that in explorer. Link to comment Share on other sites More sharing options...
CONVERT Posted October 22, 2009 Share Posted October 22, 2009 or add the global group "Admins of domain" in the local group "Administrators" of the PC. You'll have all the rights on the PC and on the network drives with an user belonging to the global group "Admins of domain". It is possible to do it with AutoIt (it works at least with XP SP2). Be careful. If a .exe is started with a RUNAS, and if this .exe starts an other .exe without giving heritage of rights, the second .exe will say that it needs administrator rights. 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