Jump to content

CD Launcher - ShellExecute, Run and Firewall Interference


Recommended Posts

Hi,

I am new-ish to AutoIT and just have a couple of questions about making a CD AutoRun launcher.

I need to open up a maximized Internet Explorer window showing a html file on a CD rom, but only using Internet Explorer and not the default browser. I have been trying to use both Run and ShellExecute but i can't get either of them to do quite what i want.

ShellExecute:

ShellExecute("iexplore.exe", @ScriptDir & "\index.html")

Launches IE without the full program path and opens the index.html link in the CD directory regardless of the drive letter but i can't find an option to make the IE window full screen while launching. Is there an option like @SW_MAXIMIZE or an equivalent?

Run:

Run("C:\Program Files\Internet Explorer\iexplore.exe", @ScriptDir & "\index.html", @SW_MAXIMIZE)

The above doesn't work but "think" i am close... or am i??? Is there any way to use Run to launch IE without passing it the exact installation directory of IE (for multiboot environments where the Programs Files may be on a different drive), using the index.html page on the CD and with the IE window maximized?

Also some firewalls like ZoneAlarm halt the running of the test compiled exe with both Run or ShellExecute commands and ask the user whether they want to allow the exe to "launch Internet Explorer... or use another program to gain access to privileged resources". This may sound "menacing" to some users who would probably deny it, resulting in Internet Explorer not being opened. If i use a batch file there is not prompt and no problem.

I also tried:

Run(@ComSpec & " /c " & 'start iexplore.exe', "", @SW_HIDE)

But that also gets a ZoneAlarm prompt about the exe trying to launch cmd.exe etc.

Does anyone have any ideas how to make this launch IE/CMD without the ZoneAlarm prompt, like i can accomplish with a batch?

TIA

Link to comment
Share on other sites

You need to look at the IE.au3 UDF, which provides the _IE functions you see in the help file. Everything you mentioned is in there.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Thanks PsaltyDS, that was a great suggestion. This is a far better option with so many more possibilities.

There is one thing i just can't quite get past though...

I am now running a full screen IE window with only the Minimize, Maximise and Close buttons up the top right, but there is still a greyed-out outline of the vertical scroll bar on the right. I have been trying to get rid of it and wading through the help and demo code files but can't seem to find it. I have probably passed over it a million times but still can't find it. Is it by using "_IEPropertySet"? How do i find out all the object variables of Internet Explorer anyway?

Thanks everyone. Much appreciated.

Link to comment
Share on other sites

Thanks PsaltyDS, that was a great suggestion. This is a far better option with so many more possibilities.

There is one thing i just can't quite get past though...

I am now running a full screen IE window with only the Minimize, Maximise and Close buttons up the top right, but there is still a greyed-out outline of the vertical scroll bar on the right. I have been trying to get rid of it and wading through the help and demo code files but can't seem to find it. I have probably passed over it a million times but still can't find it. Is it by using "_IEPropertySet"? How do i find out all the object variables of Internet Explorer anyway?

Thanks everyone. Much appreciated.

I have no idea what controls the scroll bars, never bothered to try to do anything with them, but the Document Object Model (DOM) of IE is here: The Internet Explorer Object Model

Still learning it myself...

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...