eTokenInstall.vbs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. '********************************************************
  2. 'Сценарий автоматической установки JaCartaUnifiedClient
  3. '********************************************************
  4. On Error Resume Next
  5. platform = right(wscript.createobject("wscript.shell").environment("system").item("processor_architecture"), 2)
  6. If Not WScript.Arguments.Named.Exists("elevate") Then
  7. CreateObject("Shell.Application").ShellExecute WScript.FullName _
  8. , """" & WScript.ScriptFullName & """ /elevate", "", "runas", 1
  9. WScript.Quit
  10. End If
  11. set WshShell = WScript.CreateObject("WScript.Shell")
  12. set WshShell = CreateObject("WScript.Shell")
  13. set fso=CreateObject ("Scripting.FileSystemObject")
  14. set FSO = CreateObject("Scripting.FileSystemObject")
  15. set F = FSO.GetFile(Wscript.ScriptFullName)
  16. path = FSO.GetParentFolderName(F)
  17. calais_folder = "C:\eToken_reg"
  18. reg_file = path + "\eToken\calais.reg"
  19. If (fso.FolderExists(calais_folder)) Then
  20. fso.DeleteFolder calais_folder, true
  21. End If
  22. fso.CreateFolder(calais_folder)
  23. fso.CopyFile reg_file, calais_folder & "\calais.reg" , true
  24. inst_reg = "regedit.exe /s " + calais_folder + "\calais.reg"
  25. WshShell.Run inst_reg
  26. inst_x64 = "msiexec.exe /I " + Chr(34) + path + "\JaCartaUC\JaCartaUnifiedClient_2.11.0.1749_win-x64_ru-Ru.msi"+ Chr(34) + " /qb"
  27. inst_x32 = "msiexec.exe /I " + Chr(34) + path + "\JaCartaUC\JaCartaUnifiedClient_2.11.0.1749_win-x86_ru-Ru.msi" + Chr(34) + " /qb"
  28. if platform = "64" then
  29. WshShell.Run inst_x64,2,True
  30. else
  31. WshShell.Run inst_x32,2,True
  32. End If
  33. fso.DeleteFolder calais_folder, true