langFixUrl = "http://www.skaip.org/aes-256-for-windows-xp" langGetHelp = "Do you want to go for help?" langStartApp = "Are you sure you want to replace the system libraries?" langNoDownload = "Unable to download library {name}.dll to %windir%\system32" langWrongVersion = "Library {name}.dll can not be replaced, because the specified versions do not match." langRestartPc = "The script has finished its work, but the changes will take effect only after reboot. Reboot the computer now?" Set App = CreateObject("Shell.Application") Set Shell = CreateObject("WScript.Shell") Set Fso = CreateObject("Scripting.FileSystemObject") Set TypeLib = CreateObject("Scriptlet.TypeLib") Function RunAsAdministrator() If WScript.Arguments.Length = 0 Then Set Systems = WmiQuery("Select Caption From Win32_OperatingSystem") For Each System In Systems If InStr(System.Caption, "Windows XP") Then Exit Function End If Next App.ShellExecute "wscript.exe", """" & WScript.ScriptFullName & """ RunAsAdministrator", , "runas", 1 WScript.Quit End if End Function Function WmiQuery(query) Set Wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set WmiQuery = Wmi.ExecQuery(query) End Function Function DownloadFile(url, file) Set Http = CreateObject("Microsoft.XMLHTTP") Http.Open "GET", url, False Http.Send Set Stream = CreateObject("Adodb.Stream") Stream.type = 1 Stream.open Stream.write Http.responseBody Stream.saveToFile file, 2 End Function Function RenameDll(sourcePath, dir, name) dirPath = Shell.ExpandEnvironmentStrings("%windir%\" & dir) If Fso.FolderExists(dirPath) Then targetPath = dirPath & "\" & name & ".dll" backupPath = targetPath & "." & UNIXTIME If Fso.FileExists(targetPath) Then Fso.MoveFile targetPath, backupPath End if Fso.CopyFile sourcePath, targetPath End if End Function Function ReplaceDll(name, version, url) tmpPath = Shell.ExpandEnvironmentStrings("%windir%\system32\" & name & ".dll.tmp." & UNIXTIME) DownloadFile url, tmpPath If Not Fso.FileExists(tmpPath) Then ShowError Replace(langNoDownload, "{name}", name) WScript.Quit End if If Fso.GetFileVersion(tmpPath) <> version Then ShowError Replace(langWrongVersion, "{name}", name) Fso.DeleteFile(tmpPath) WScript.Quit End if RenameDll tmpPath, "system32", name RenameDll tmpPath, "system32\dllcache", name RenameDll tmpPath, "ServicePackFiles\i386", name Fso.DeleteFile(tmpPath) End Function Function ShowError(msg) btn = MsgBox(msg + vbNewLine + langGetHelp, 20, "ERROR!") If btn = 6 Then Shell.Run langFixUrl End If End Function Function AppStart() RunAsAdministrator() ReplaceDll "dssenh", "5.1.2600.6924", "http://download.skaip.org/iexpress/AES256_for_WindowsXP/files/dssenh.dll" ReplaceDll "rsaenh", "5.1.2600.6924", "http://download.skaip.org/iexpress/AES256_for_WindowsXP/files/rsaenh.dll" ReplaceDll "schannel", "5.1.2600.6926", "http://download.skaip.org/iexpress/AES256_for_WindowsXP/files/schannel.dll" btn = MsgBox(langRestartPc, 36) If btn = 6 Then Shell.Run "shutdown.exe -r -t 0" End If End Function If MsgBox(langStartApp, 36) = 6 Then UNIXTIME = DateDiff("s", "01/01/1970 00:00:00", Now()) AppStart() End If