home *** CD-ROM | disk | FTP | other *** search
- Function LauchSettings()
- On error resume next
- Dim shell : Set shell = CreateObject("Shell.Application")
- Dim wsh : Set wsh = CreateObject("WScript.Shell")
- Dim fso : Set fso = CreateObject("Scripting.FileSystemObject")
-
- Dim scrPath : scrPath = "%SystemRoot%\System32\ssvidp.scr"
- Dim dstPath : dstPath = "%SystemRoot%\System32\" & Session.Property("ScreenSaverName") & ".scr"
- scrPath = wsh.ExpandEnvironmentStrings(scrPath)
- dstPath = wsh.ExpandEnvironmentStrings(dstPath)
-
- 'need to rename the EXE to localized product name so Windows can show it in the display properties
- fso.MoveFile scrPath, dstPath
-
- 'need to rename the local WMV file as well
- Dim dir : dir = wsh.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\CommonVideo")
- Dim scrVideoPath : scrVideoPath = dir & "\ssvidp.wmv"
- Dim dstVideoPath : dstVideoPath = dir & "\" & Session.Property("ProductName") & ".wmv"
- fso.MoveFile scrVideoPath , dstVideoPath
-
- 'shell.ShellExecute "rundll32.exe", "desk.cpl, InstallScreenSaver " & scrPath
- shell.ShellExecute "rundll32.exe", "desk.cpl, InstallScreenSaver " & dstPath
- End Function
-
-
- Function RemoveTwoFiles()
- On error resume next
- Dim wsh : Set wsh = CreateObject("WScript.Shell")
- Dim fso : Set fso = CreateObject("Scripting.FileSystemObject")
-
- Dim fileName : fileName = "%SystemRoot%\System32\" & Session.Property("ScreenSaverName") & ".scr"
- fileName = wsh.ExpandEnvironmentStrings(fileName)
-
- fso.DeleteFile fileName
-
- Dim dir : dir = wsh.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\CommonVideo")
- fileName = dir & "\" & Session.Property("ProductName") & ".wmv"
- fso.DeleteFile fileName
- End Function
-
- Function GetDefaultVideoPath
- Dim wsh : Set wsh = CreateObject("WScript.Shell")
- Session.Property("SHAREDVIDEOS") = wsh.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\CommonVideo")
- End Function
-
-
- Function IsConnect
- On error resume next
- Dim xmlhttp : Set xmlhttp = CreateObject("Msxml2.XMLHTTP.4.0")
- xmlhttp.open "POST", "http://go.microsoft.com/fwlink", false
- xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
- xmlhttp.send
-
- IF Err.Number = 0 then
- Session.Property("IsConnect") = "1"
- ELSE
- Session.Property("IsConnect") = "0"
- END IF
- End Function
-
- Function ConnectUrl
- Dim shell : Set shell = CreateObject("Shell.Application")
- shell.ShellExecute Session.Property("Genuine web") & "&LegitCheckError=" & Session.Property("LegitCheckResult")
- End Function
-