Jump to content

A little new to autoit and needing some help


Recommended Posts

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
Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...