Sign in to follow this  
Followers 0
lyledg

Problems running app from logon script

9 posts in this topic

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

Share this post


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

Share this post


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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

hmmmm, maybe try the loop i was talking about, other then that i would have to see what your trying to do to get any ideas; so i could also experiment.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


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

Share this post


Link to post
Share on other sites

FINALLY got it right thanks to JdeB!!!

The shortcut trick worked..

Cheers !!

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