lyledg Posted September 9, 2004 Share Posted September 9, 2004 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 More sharing options...
DarkNecromancer Posted September 9, 2004 Share Posted September 9, 2004 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 More sharing options...
lyledg Posted September 9, 2004 Author Share Posted September 9, 2004 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 More sharing options...
nobby Posted September 9, 2004 Share Posted September 9, 2004 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 More sharing options...
DarkNecromancer Posted September 9, 2004 Share Posted September 9, 2004 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. Link to comment Share on other sites More sharing options...
lyledg Posted September 9, 2004 Author Share Posted September 9, 2004 Ok, I have tried just about everything now 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! Link to comment Share on other sites More sharing options...
Developers Jos Posted September 9, 2004 Developers Share Posted September 9, 2004 Ok, I have tried just about everything now 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 More sharing options...
lyledg Posted September 9, 2004 Author Share Posted September 9, 2004 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... 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 More sharing options...
lyledg Posted September 9, 2004 Author Share Posted September 9, 2004 FINALLY got it right thanks to JdeB!!! The shortcut trick worked.. Cheers !! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now