1hand0fg0d Posted February 19, 2013 Posted February 19, 2013 (edited) Im pretty new to using autoit and Im trying to setup a script to be able to open up IE with activex allowed and if possible restrict it to only browsing to one address since the browser will have escalated privelages. The reason Im doing this is that we have a security camera setup where we use a piece of software that runs in IE but needs activex. our current domain does not allow for the personell that uses these computers to have any admin rights to be able to allow for active x normally. I just need to launch IE with admin credentials but I dont want them to have full access to the browser for security purposes. I have the runas part setup but do not know how to make the other parts work for me. I had some ideas for if statements but I couldnt figure out how to get it to work the way I need. #RequireAdmin Local $sUserName = "Administrator" Local $sDomain = "" Local $sPassword = "P@$$w0rd" RunAs($sUserName, $sDomain, $sPassword, 0,"C:\Program Files\Internet Explorer\iexplore.exe http://172.21.222.4") this is the usable portion of what I have and Ive searched for hours today, please help Edited February 19, 2013 by Melba23 Removed email link from password
sksbir Posted February 19, 2013 Posted February 19, 2013 hello statement #Requireadmin is to ask for admin permission. has your users have no admin permission, this shouldn't be used. Once IE is launched with elevated rights, you can not stop user to load an other URL in IE and even launch an other application from IE . example : just type "c:" instead an URL in IE window.... So this is definitively not the solution.
1hand0fg0d Posted February 19, 2013 Author Posted February 19, 2013 hmm ok, so any ideas on a way I can make this work with autoit?
1hand0fg0d Posted February 19, 2013 Author Posted February 19, 2013 or how about a way to just open IE with activex working? when I run this code it seems like activex is not enabled in any way. if you can help me get past that I can figure out the rest
Bert Posted February 19, 2013 Posted February 19, 2013 Just go into the proxy settings and allow only that address. Once done, edit the registry to lock down IE to prevent the users from editing the settings. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Colyn1337 Posted February 19, 2013 Posted February 19, 2013 (edited) check out _IECreate() and _IEPropertySet() There's an IE property you'd be most interested in called "Addressbar". You'll probably also like "Toolbar" and "Menubar". Anyways, check those out and I think you'll figure it out If not, let us know and we can always provide more assistance. Edited February 20, 2013 by Colyn1337
1hand0fg0d Posted February 20, 2013 Author Posted February 20, 2013 Thanks guys, so far so good. Now if I open an internet explorer window like this and say it pops up a second window automatically. is there a Winclose option to close the first window and leave the second window still open?
1hand0fg0d Posted February 20, 2013 Author Posted February 20, 2013 (edited) Ive tried the following to close the window I open with the above code AutoItSetOption ("WinTitleMatchMode", 2) WinClose("title", "WV-NW502S Network Camera - Windows Internet Explorer") WinKill("[CLASS:IExplore]", "") $handle = WinGetHandle("WV-NW502S Network Camera - Windows Internet Explorer", "") WinClose($handle) Im sure its something simple Im missing, just gotta get the right syntax Edit: ok so with all of the following combined it did exactly what I needed AutoItSetOption ("WinTitleMatchMode", 2) WinClose("title", "WV-NW502S Network Camera - Windows Internet Explorer") WinKill("[CLASS:IExplore]", "") $handle = WinGetHandle("WV-NW502S Network Camera - Windows Internet Explorer", "") WinClose($handle) WinClose("[ACTIVE]", "") if I can remove any of this for optimization please let me know Edited February 20, 2013 by 1hand0fg0d
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