expect to open a link in internet explorer and refresh it automatically every 5 seconds but it can not open after try

powershell with administrator

Set-ExecutionPolicy remotesigned

powershell script

On Error Resume Next

Set objExplorer = CreateObject("InternetExplorer.Application")

objExplorer.Navigate "http://www.google.com"   
objExplorer.Visible = 1

Wscript.Sleep 5000

Set objDoc = objExplorer.Document

Do While True
    Wscript.Sleep 5000
    If Err <> 0 Then
    End If
  • That is WSH, not Powershell. – Kevin Panko Oct 5 '14 at 15:50

The command

Set-ExecutionPolicy remotesigned

Is a PowerShell command, but the script is VBScript.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.