Sign in to follow this  
Followers 0
1hand0fg0d

A little new to autoit and needing some help

8 posts in this topic

#1 ·  Posted (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 by Melba23
Removed email link from password

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

hmm ok, so any ideas on a way I can make this work with autoit?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by Colyn1337

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 by 1hand0fg0d

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0