Jump to content

Problems running app from logon script


lyledg
 Share

Recommended Posts

Guys

I am creating a GUI logon script, which in the code launces IE and displays a *.htm file from a server UNC path location.

When I run the script manually from my PC, it launches the browser and the file displays normally, and IE remains open but when I run the compiled exe from the logon process, it launches the IE browser, but then exits the browser immedialtely...

What I am needing is that the IE browser stays running and does not exit..

Here is the code, simple enough..

Global $File = ("\\<Servername>\motd$\MOTD.htm")

If FileExists("\\<Servername>\motd$\MOTD.htm") then

Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE" & " " & $file )

Else

MsgBox(0, "MOTD", "No Message of the day..., continuing", 1)

Endif

I have tried using Runwait, but this won't do because as this is part of the logon process, I want the page displayed and remain while the rest of the script continues...

Any Ideas?

Cheers

Lyle

Link to comment
Share on other sites

I dont know if i'm understanding your problem right or not so i'll see. Your running this at the point where you log into windows as a replacment or additional logon? Then only thing that i can think of is to put the script into a loop waiting for something to happen, whether it be waiting for the browser to close or for a special program to start which could simulate the finished login.

Link to comment
Share on other sites

Ok...This is the process..

Normal Windows Logon..

Once logged on, the GUI logon that I have created is then called via GPO..

I am then wanting to Launch IE to display a "message of the day" htm file. Problem is IE does not stay open....I want it to remain open...

Hope that helps to make it clearer...

Link to comment
Share on other sites

Just a thought

$file will result in \\<Servername>\motd$\MOTD.htm

but to use it in the runwait funtion it should be between " "

like this "\\<Servername>\motd$\MOTD.htm"

So try to declare your variable

Global $File = ('"\\<Servername>\motd$\MOTD.htm"')

Hope it works, cannot test at present

CheersNobby

Link to comment
Share on other sites

  • Developers

Ok, I have tried just about everything now :ph34r:

When I use the Runwait command, The htm file launches fine, but as I don't want the script to pause I need to use the Run command..

Any suggestions would be most welcome!

<{POST_SNAPBACK}>

AutoIt won't close IE unless you have scripted that.

Maybe you need to sleep a while before shelling IE..

One other option could be to create an ShortCut with your AutoIt3 script in the users startup folder and then exit.. this should accomplish the same...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Ok,

I tried the use of sleep and it didn't work..

Funny thing is, that when I use the Runwait command, IE shells out the correctly and the page launches, but when using the Run command, it does not work??

I am really puzzled... :ph34r:

Anyone willing to have a look at my script? I would rather PM it as it has a lot of code..

Cheers guys..

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...