rob998 Posted August 20, 2010 Posted August 20, 2010 Hi Guys, I have a simple script to open a webpage when users logon. This is it: Option Explicit Dim wshShell Set wshShell = WScript.CreateObject("WScript.Shell") wshShell.Run ("http://www.website.com") The trouble is it opens but when the icons appear on the desktop it closes. So my question is how do I stop it closing? Thanks Rob
Arthur Posted August 20, 2010 Posted August 20, 2010 You could do something like this... Set objExplorer = WScript.CreateObject("InternetExplorer.Application") objExplorer.Navigate "http://www.google.co.uk/" objExplorer.ToolBar = 0 objExplorer.StatusBar = 0 objExplorer.Width = 800 objExplorer.Height = 600 objExplorer.Left = 0 objExplorer.Top = 0 objExplorer.Visible = 1
mac_shinobi Posted August 20, 2010 Posted August 20, 2010 You could do something like this... Set objExplorer = WScript.CreateObject("InternetExplorer.Application") objExplorer.Navigate "http://www.google.co.uk/" objExplorer.ToolBar = 0 objExplorer.StatusBar = 0 objExplorer.Width = 800 objExplorer.Height = 600 objExplorer.Left = 0 objExplorer.Top = 0 objExplorer.Visible = 1 The above is most likely the official way but I have done it in the past using the shell object either run or exec and the explorer process ie wshshell.run "explorer.exe http://www.google.co.uk" I think you can use vbMaximise or vbNormal or w/e but not sure
Arthur Posted August 20, 2010 Posted August 20, 2010 There are lots of different ways of doing this. I suppose it depends on what you are trying to achieve. Here is another method I sometimes use... Set WshShell = WScript.CreateObject("WScript.Shell") Return = WshShell.Run("""iexplore.exe"" http://www.google.co.uk/", 1, true)
djones Posted August 21, 2010 Posted August 21, 2010 I have also done this via GPO. I forget exactly which policy and can't check at present but basically I set iexplorer.exe to run at login and open the specified site.
Kitkatninja Posted August 21, 2010 Posted August 21, 2010 (edited) Or you can use a simple .bat file. Eg to open up the webpage http://www.yahoo.com, in the .bat file type this in: start iexplore http://www.yahoo.com -Ken Edited August 21, 2010 by Kitkatninja formatting
rob998 Posted August 22, 2010 Author Posted August 22, 2010 Thanks for the suggestions. I will give it a try tomorrow. Just hope that when it opens it says open. I will report back.
clareq Posted August 22, 2010 Posted August 22, 2010 Does this need to be only for a specific set of users? If not, can you not just put a shortcut in the computer All Users startup folder?
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