-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinvoker.ps1
29 lines (21 loc) · 1.19 KB
/
invoker.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function Test( $releases ) {
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /t REG_DWORD /v 1A10 /f /d 0 | out-null
#$releases = 'http://www.videosoftdev.com/free-video-editor/download'
$download_page = Invoke-WebRequest -Uri $releases
$cpt=1
$resu=@{}
$download_page.ParsedHtml.getElementsByTagname("p") |%{
if ($_.id -eq $null){ $_.id="p$cpt";$cpt++}
$resu[$($_.id)]=$_.innerHTML
}
#$resu
$version = $resu.p4
write-host A version is -$version-
$version = $version -replace '</STRONG>',''
write-host B1 version is -$version-
$version = $version -replace '<STRONG slick-uniqueid="\d\d\d">',''
write-host C version is -$version-
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v 1A10 /f | out-null
$download_page.close
}
Test -releases 'http://www.videosoftdev.com/free-video-editor/download'