home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 61 / Palmtops_numero61.iso / pc / Outils / runtime / NET CompactFrameWork1 SP2.msi / Binary.LicVBS < prev    next >
Encoding:
Text File  |  2004-03-16  |  972 b   |  37 lines

  1. Option Explicit
  2.  
  3. On Error Resume Next
  4.  
  5. Const msiOpenDatabaseModeReadOnly = 0
  6.  
  7. do 
  8.    dim record, view
  9.    Set view = Session.Database.OpenView("SELECT Text FROM Control WHERE Control = 'LicenseText'") 
  10.    if Err<>0 then Exit do
  11.    view.Execute 
  12.    if Err<>0 then Exit do
  13.    
  14.    Set record = view.Fetch 
  15.    if record Is Nothing Then Exit Do
  16.    if Err<>0 then Exit do
  17.    Dim fso, MyFile
  18.    
  19.    Set fso = CreateObject("Scripting.FileSystemObject")
  20.    if Err<>0 then Exit do
  21.    Dim WshShell : Set WshShell = CreateObject("Wscript.Shell")
  22.    if Err<>0 then Exit do
  23.    dim tempFilePath : tempFilePath = WshShell.ExpandEnvironmentStrings("%TEMP%") & "\NETCFEULA.rtf"
  24.    if Err<>0 then Exit do
  25.    Set MyFile = fso.CreateTextFile(tempFilePath, True)
  26.    if Err<>0 then Exit do
  27.    MyFile.Write(record.StringData(1))
  28.    if Err<>0 then Exit do
  29.    MyFile.Close
  30.    if Err<>0 then Exit do
  31.    WshShell.Run "write.exe " & tempFilePath
  32.    exit do
  33. loop
  34.  
  35.  
  36.  
  37.