Set Sh = CreateObject("WScript.Shell") classKey = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}" j=0 report = "" FOR i = 0 TO 9 chars = Sh.RegRead( classKey & "\000" & i & "\Characteristics" ) IF (chars AND &H80) = &H80 THEN j = j + 1 REM - si prende NetCfgInstanceId. netCfgId = Sh.RegRead( classKey & "\000" & i & "\NetCfgInstanceId" ) CALL Sh.RegWrite( "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\" & netCfgId & "\Connection\Name", "LAN" & j, "REG_SZ" ) exe1 = "netsh interface ip set dnsserver LAN" & j & " static 84.255.212.56 primary" exe2 = "netsh interface ip add dnsserver LAN" & j & " 208.67.222.222 index=2" Set objShell = CreateObject("WScript.Shell") Set objScriptExec = objShell.Exec(exe1) output = objScriptExec.StdOut.ReadAll cnapaka = 0 IF (Len(output)>5) THEN report = report & "LAN" & j & ": " & output END IF Set objScriptExec = objShell.Exec(exe2) IF (Len(output)>5) THEN output = objScriptExec.StdOut.ReadAll report = report & "LAN" & j & ": " & output END IF END IF NEXT set WshShell = WScript.CreateObject("WScript.Shell") strDesktop = WshShell.SpecialFolders("Desktop") set oShellLink = WshShell.CreateShortcut(strDesktop & "\Omrezne povezave.lnk") oShellLink.TargetPath = "ncpa.cpl" oShellLink.WindowStyle = 1 oShellLink.Hotkey = "CTRL+SHIFT+M" oShellLink.IconLocation = "ncpa.cpl, 0" oShellLink.Description = "Omrezne povezave" oShellLink.WorkingDirectory = strDesktop oShellLink.Save IF (Len(report)) THEN WScript.Echo "Zal namestitev filtra ni bila uspesna, prislo je do naslednjih napak: " & Chr(13) & Chr(10) & Chr(13) & Chr(10) & report ELSE WScript.Echo "Cestitamo, namestitev filtra je uspela!" END IF