'--------------------------------------------------------------------- ' PROSZĘ ZMODYFIKOWAĆ PONIŻSZE WARTOŚCI WG POTRZEB '--------------------------------------------------------------------- ' Liczba kanałów, 4 = cztery kanały w małych oknach, ... , 1 = jeden kanał w małym oknie, 0 = jeden kanał w dużym oknie Channels = "1" ' Definicja i objaśnienia parametrów wspólnych dla wszystkich 4 kanałów: Dim IPaddress(4) ' - adres IP lub nazwa DNS serwera wideo, np. "84.40.233.133" lub "videoserver.dyndns.org" Dim ServerType(4) ' - typ serwera wideo: 1 = GV-Videoserver (port TCP 443 zamiast standardowego TCP 10000) 0 = Komputer z kartą GV (porty TCP 4550, 5550, 6550) Dim Camera(4) ' - numer kamery na serwerze wideo Dim Username(4) ' - nazwa użytkownika z dostępem do serwera wideo Dim Password(4) ' - hasło dostępu do serwera wideo Dim TimeOut(4) ' - przydzielony czas podłączenia do tego kanału, w sekundach Dim Audio(4) ' - przesyłanie dźwięku, 1 = włączone, 0 = wyłączone ' Kanał 1 IPaddress(1) = "pensjonat.dipmap.com" ServerType(1) = "0" Camera(1) = "7" UserName(1) = "hotel" Password(1) = "pogoda" TimeOut(1) = "60" Audio(1) = "0" ' Kanał 2 IPaddress(2) = "212.160.173.74" ServerType(2) = "1" Camera(2) = "2" UserName(2) = "guest" Password(2) = "1" TimeOut(2) = "60" Audio(2) = "0" ' Kanał 3 IPaddress(3) = "212.160.173.76" ServerType(3) = "0" Camera(3) = "1" UserName(3) = "a" Password(3) = "a" TimeOut(3) = "60" Audio(3) = "0" ' Kanał 4 IPaddress(4) = "212.160.173.76" ServerType(4) = "0" Camera(4) = "2" UserName(4) = "a" Password(4) = "a" TimeOut(4) = "60" Audio(4) = "0" '--------------------------------------------------------------------- ' PROSZĘ NIE MODYFIKOWAĆ PONIŻSZEGO KODU '--------------------------------------------------------------------- Dim ofs, oShell, nRetCode Set ofs = CreateObject("Scripting.FileSystemObject") Set oShell = WScript.CreateObject ("WScript.shell") PlayerPath = oShell.ExpandEnvironmentStrings("%temp%") & "\GVPlayer\" PlayerFileName = "GVPlayer.exe" PlayerVersion = "1.0.0.7" PlayerArchiveName = "gvplayer-v" & PlayerVersion & ".7z" On Error Resume Next DownloadScript = ofs.GetTempName If ofs.GetFileVersion(PlayerPath & PlayerFileName) < PlayerVersion Or Not ofs.FileExists(PlayerPath & PlayerFileName) Then oShell.Popup "Pobieranie komponentów (ok. 2 MB). Proszę czekać.", 4, "Instalacja lub aktualizacja odtwarzacza" ofs.GetFile(oShell.ExpandEnvironmentStrings("%temp%") & "\" & PlayerArchiveName).Delete Set fsFTPScript = ofs.CreateTextFile(oShell.ExpandEnvironmentStrings("%temp%") & "\" & DownloadScript, True) fsFTPScript.WriteLine "open polvision.home.pl" fsFTPScript.WriteLine "user anonymous" fsFTPScript.WriteLine "pass ano@ano.com" fsFTPScript.WriteLine "binary" fsFTPScript.WriteLine "quote pasv" fsFTPScript.WriteLine "cd gvplayer" fsFTPScript.WriteLine "get 7za.exe" fsFTPScript.WriteLine "get " & PlayerArchiveName fsFTPScript.WriteLine "bye" fsFTPScript.Close Set fsFTPScript = Nothing nRetCode = oShell.run("cmd /c cd %temp% && ftp.exe -i -n -v -s:" & DownloadScript & " && del /Q " & DownloadScript, 0, false ) For m = 1 To 60 For n = 1 To 5 WScript.Sleep 1000 If Not ofs.FileExists(oShell.ExpandEnvironmentStrings("%temp%") & "\" & DownloadScript) Then m = 61 Exit For End If If n = 1 Then oShell.Popup "Proszę czekać. Trwa pobieranie odtwarzacza...", 2, "Pobrano " & m, 32 End If Next Next If m = 60 Then ofs.GetFile(oShell.ExpandEnvironmentStrings("%temp%") & "\" & DownloadScript).Delete WScript.Echo "Pobieranie odtwarzacza nie powiodło się. Skontaktuj się z administratorem." WScript.Quit End If oShell.Popup "Zakończono pobieranie odtwarzacza. Uruchamianie.", 5, "Uruchamianie" If ofs.FolderExists(PlayerPath) Then nRetCode = oShell.run("cmd /c rmdir /Q /S " & Chr(34) & PlayerPath & Chr(34), 0, true ) End If nRetCode = oShell.run("cmd /c cd %temp% && 7za.exe x -y -o" & Chr(34) & PlayerPath & Chr(34) & " " & PlayerArchiveName, 0, true ) ofs.GetFile(oShell.ExpandEnvironmentStrings("%temp%") & "\" & PlayerArchiveName).Delete ofs.GetFile(oShell.ExpandEnvironmentStrings("%temp%") & "\7za.exe").Delete oShell.RegWrite "HKCU\Software\Classes\TypeLib\{0F5D0CE9-205B-4090-B2FB-4F26F55DD1CE}\1.0\", "LiveX_v8.1.2.0" oShell.RegWrite "HKCU\Software\Classes\TypeLib\{0F5D0CE9-205B-4090-B2FB-4F26F55DD1CE}\1.0\0\win32\", PlayerPath & "LiveX.ocx" oShell.RegWrite "HKCU\Software\Classes\TypeLib\{0F5D0CE9-205B-4090-B2FB-4F26F55DD1CE}\1.0\FLAGS\", "2" oShell.RegWrite "HKCU\Software\Classes\TypeLib\{0F5D0CE9-205B-4090-B2FB-4F26F55DD1CE}\1.0\HELPDIR\", PlayerPath oShell.RegWrite "HKCU\Software\Classes\Interface\{355259DB-C66D-4333-8823-A301276BEAD0}\", "_DLiveX" oShell.RegWrite "HKCU\Software\Classes\Interface\{355259DB-C66D-4333-8823-A301276BEAD0}\ProxyStubClsid\", "{00020420-0000-0000-C000-000000000046}" oShell.RegWrite "HKCU\Software\Classes\Interface\{355259DB-C66D-4333-8823-A301276BEAD0}\ProxyStubClsid32\", "{00020420-0000-0000-C000-000000000046}" oShell.RegWrite "HKCU\Software\Classes\Interface\{355259DB-C66D-4333-8823-A301276BEAD0}\TypeLib\", "{0F5D0CE9-205B-4090-B2FB-4F26F55DD1CE}" oShell.RegWrite "HKCU\Software\Classes\Interface\{355259DB-C66D-4333-8823-A301276BEAD0}\TypeLib\Version", "1.0" oShell.RegWrite "HKCU\Software\Classes\Interface\{B56EC028-A112-4497-B823-DE7A7B40236A}\", "_DLiveXEvents" oShell.RegWrite "HKCU\Software\Classes\Interface\{B56EC028-A112-4497-B823-DE7A7B40236A}\ProxyStubClsid\", "{00020420-0000-0000-C000-000000000046}" oShell.RegWrite "HKCU\Software\Classes\Interface\{B56EC028-A112-4497-B823-DE7A7B40236A}\ProxyStubClsid32\", "{00020420-0000-0000-C000-000000000046}" oShell.RegWrite "HKCU\Software\Classes\Interface\{B56EC028-A112-4497-B823-DE7A7B40236A}\TypeLib\", "{0F5D0CE9-205B-4090-B2FB-4F26F55DD1CE}" oShell.RegWrite "HKCU\Software\Classes\Interface\{B56EC028-A112-4497-B823-DE7A7B40236A}\TypeLib\Version", "1.0" oShell.RegWrite "HKCU\Software\Classes\CLSID\{01D97055-2BB5-4259-A4E3-5BC5511FB1A2}\", "Live Property Page" oShell.RegWrite "HKCU\Software\Classes\CLSID\{01D97055-2BB5-4259-A4E3-5BC5511FB1A2}\InprocServer32\", PlayerPath & "LiveX.ocx" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\", "LiveX_v8120" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\Control\", "" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\Implemented Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}\", "" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\Implemented Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}\", "" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\InprocServer32\", PlayerPath & "LiveX.ocx" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\InprocServer32\ThreadingModel", "Apartment" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\MiscStatus\", "0" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\MiscStatus\1\", "131473" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\ProgID\", "LiveX_v8120" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\ToolboxBitmap32\", PlayerPath & "LiveX.ocx, 1" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\TypeLib\", "{0F5D0CE9-205B-4090-B2FB-4F26F55DD1CE}" oShell.RegWrite "HKCU\Software\Classes\CLSID\{F4421170-DB22-4551-BBFB-FFCFFB419F6F}\Version\", "1.0" oShell.RegWrite "HKCU\Software\Classes\LiveX_v8120\", "LiveX_v8120" oShell.RegWrite "HKCU\Software\Classes\LiveX_v8120\CLSID\", "{F4421170-DB22-4551-BBFB-FFCFFB419F6F}" oShell.RegWrite "HKCU\Software\Classes\Component Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}\409", "Controls safely scriptable!" oShell.RegWrite "HKCU\Software\Classes\Component Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}\409", "Controls safely initializable from persistent data!" oShell.RegWrite "HKCU\Software\Microsoft\Windows NT\CurrentVersion\DRIVERS32\vidc.GEOX", PlayerPath & "GeoCodec.dll", "REG_SZ" oShell.RegWrite "HKCU\Software\Microsoft\Windows NT\CurrentVersion\DRIVERS32\vidc.GEOV", PlayerPath & "GeoCodec.dll", "REG_SZ" oShell.RegWrite "HKCU\Software\Microsoft\Windows NT\CurrentVersion\DRIVERS32\vidc.GM20", PlayerPath & "GXGM20.dll", "REG_SZ" oShell.RegWrite "HKCU\Software\Microsoft\Windows NT\CurrentVersion\DRIVERS32\vidc.GMP4", PlayerPath & "GXAMP4.dll", "REG_SZ" oShell.RegWrite "HKCU\Software\Microsoft\Windows NT\CurrentVersion\DRIVERS32\vidc.GM40", PlayerPath & "GXAMP4.dll", "REG_SZ" oShell.RegWrite "HKCU\Software\Microsoft\Windows NT\CurrentVersion\DRIVERS32\vidc.G264", PlayerPath & "GX264.dll", "REG_SZ" oShell.RegWrite "HKCU\Software\Microsoft\Windows NT\CurrentVersion\DRIVERS32\msacm.geoadpcm", PlayerPath & "GeoADPCM.acm", "REG_SZ" End if If Channels >= 1 And Channels <= 4 Then For n = 1 To Channels nRetCode = oShell.run( Chr(34) & PlayerPath & PlayerFileName & Chr(34) & " " & IPaddress(n) & " " & ServerType(n) & " " & Camera(n) - 1 & " " & UserName(n) & " " & Password(n) & " " & n & " " & TimeOut(n) & " " & Audio(n), 1, false ) Next Else nRetCode = oShell.run( Chr(34) & PlayerPath & PlayerFileName & Chr(34) & " " & IPaddress(1) & " " & ServerType(1) & " " & Camera(1) - 1 & " " & UserName(1) & " " & Password(1) & " 0 " & TimeOut(1) & " " & Audio(1), 1, false ) End If Set oShell = Nothing Set ofs = Nothing