Jump to content

Recommended Posts

Posted

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

Posted

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

Posted
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

Posted

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)

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

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



×
×
  • Create New...