[svn] / branches / release-1_3-branch / xvidextra / src / installer / CheckUpdate.ps1 Repository:
ViewVC logotype

Diff of /branches/release-1_3-branch/xvidextra/src/installer/CheckUpdate.ps1

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2119, Tue Jun 16 09:49:28 2015 UTC revision 2120, Tue Jun 16 09:50:23 2015 UTC
# Line 162  Line 162 
162    
163  # Main  # Main
164    
165    $clmid = 'HKLM:\SOFTWARE\Microsoft\Cryptography'
166    $clmid = (Get-ItemProperty -Path $clmid -Name MachineGuid).MachineGuid
167    $clmid = $clmid -replace '[-]',''
168    $md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
169    $utf8 = [system.Text.Encoding]::UTF8
170    $hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($clmid)))
171    $hash = $hash.ToLower() -replace '[-]',''
172    $rkey = 'HKCU:\SOFTWARE\GNU\XviD'
173    $pf = (Get-ItemProperty -Path $rkey -Name PerfCount).PerfCount
174    $rkey = (Set-ItemProperty -Path $rkey -Name PerfCount -Value 0 -Type DWord)
175  $scriptpath = $MyInvocation.MyCommand.Path  $scriptpath = $MyInvocation.MyCommand.Path
176  $script:xvid_dir = Split-Path $scriptpath  $script:xvid_dir = Split-Path $scriptpath
177  $tmp = $env:temp  $tmp = $env:temp
# Line 172  Line 182 
182  }  }
183    
184  $url = $FileContent["Update"]["url"]  $url = $FileContent["Update"]["url"]
185    $url = $url + "&p=" + $pf + "&h=" + $hash
186  $object = Get-WebClient  $object = Get-WebClient
187  $localPath = $tmp\update.xml  $localPath = $tmp\update.xml
188  $object.DownloadFile($url, $localPath)  $object.DownloadFile($url, $localPath)

Legend:
Removed from v.2119  
changed lines
  Added in v.2120

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4