Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

GP Script to Open IE Window on Login

Posted on 2004-03-29
6
Medium Priority
?
1,973 Views
Last Modified: 2013-12-19
i'm using a vbscript to open IE to a particular webpage (our intranet page) when a user logs in. my problem is that not all users have their screen resolution set to 1024x768 which is what i've written the script to run best at. is there a simple way to get the window to size itself to the maximum available space? if not, what is the vbscript command to make the window startup maximized (not IE fullscreen since the users are unlikely to know how to close it)? the script i've written is:

dim ie
set ie=createobject("internetexplorer.application")

ie.navigate"http://intranet"
ie.toolbar=0
ie.statusbar=0
ie.Top=0
ie.Left=0
ie.Width=1024
ie.Height=740
ie.visible=true
0
Comment
Question by:craskin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:following
ID: 10715448
You could try using ie.document.parentWindow.screen.width and ie.document.parentWindow.screen.height to set variables to the current resolution and then feed those into ie.Width and ie.Height.

I'll try to post an example shortly.

Hope this helps,
-jdm

0
 
LVL 3

Expert Comment

by:following
ID: 10715560
This should do the trick:

dim ie
set ie=createobject("internetexplorer.application")
ie.navigate"http://intranet"
ie.toolbar=0
ie.statusbar=0
ie.Top=0
ie.Left=0
ie.visible=true
ie.Width=ie.document.parentwindow.screen.availWidth
ie.Height=ie.document.parentwindow.screen.availHeight

Note: I used availWidth and availHeight in the example since that ensures that the ie object will not overlap the taskbar.

Hope this helps,
-jdm
0
 
LVL 12

Author Comment

by:craskin
ID: 10716077
generated error code 80004005.
0
Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

 
LVL 3

Accepted Solution

by:
following earned 200 total points
ID: 10716794
I think that's because we are trying to change properties before the object is fully instantiated.  Try this:

Dim ie
Set ie=createobject("internetexplorer.application")
With ie
    .navigate "about:blank"
    Do Until .readyState=4
      WScript.Sleep 10
    Loop
    .toolbar=0
    .statusbar=0
    .Top=0
    .Left=0
    .Width=ie.document.parentwindow.screen.availWidth
    .Height=ie.document.parentwindow.screen.availHeight
    .navigate "http://intranet"
    .visible=true
End With
0
 
LVL 12

Author Comment

by:craskin
ID: 10716958
excellent! it worked!
0
 

Expert Comment

by:vicky1982
ID: 26208122
can you Please suggesth how can i set user default page set by them , script will not change thier page only it will open site which we want in the Last Line.

0

Featured Post

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question