View Full Version : WshShell.Run (WXP)
Win_User
06-30-2002, 02:04 PM
How can I use this command to open internet explorer and a webpage?
I have tried:
WshShell.Run "internet explorer" & " test.htm ", 3, True
I have also tried using:
WshShell.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
and then the sendkeys method to open the webpage, but WSH says that IEXPLORER.EXE cannot be found.
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run <font color=blue>"iexplore"</font color=blue> & <font color=red>" "</font color=red> & <font color=green>"www.winguides.com"</font color=green>, 1, True
Set WshShell = Nothing
'================= OR =======================
UserName = "JoeNextDoor"
PassWord = "MySecretPassword"
Set oIE = WScript.CreateObject("InternetExplorer.Application")
oIE.navigate "http://www.hotmail.com"
oIE.visible = 1
' Important: wait till MSIE Is ready
Do While (oIE.Busy)
WScript.Sleep 200
Loop
oIE.document.passwordform.login.value = UserName
oIE.document.passwordform.passwd.value = PassWord
oIE.document.passwordform.submit()
Set oIE = Nothing
wscript.quit
'===========================================
Jama
Win_User
07-01-2002, 08:27 AM
Thank you so much ;)
Powered by vBulletin™ Version 4.1.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.