Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

  1. '=======================================
  2. ' addoemhsstest.vbs
  3. ' Cary Polen
  4. ' 9/20/2000
  5. ' Copyright Microsoft Corp 2000
  6. '
  7. ' This scripts registers Healthfest
  8. ' as a vendor on the machine.
  9. '========================================
  10. ' Declare variables
  11. Dim objFSO
  12. Dim objShell
  13. Dim objHCU
  14. ' Assign constants
  15. CONST strSource = "\\pchcert\certs\"
  16. ' Create objects
  17. Set objFSO = Wscript.CreateObject("Scripting.FileSystemObject")
  18. Set objShell = Wscript.CreateObject("Wscript.Shell")
  19. Set objHCU = Wscript.CreateObject("hcu.pchupdate")
  20. ' Get paths
  21. strWindir = objFSO.GetSpecialFolder(0).Path
  22. strTempFolder = objFSO.GetSpecialFolder(2).Path
  23. strPackage = strTempFolder & "\addoemhealthfest.cab"
  24. ' Copy files locally
  25. objFSO.CopyFile strSource & "addoemhealthfest.cab", strTempFolder & "\"
  26. objFSO.CopyFile strSource & "pchcert2.reg", strWindir & "\"
  27. ' Write CA cert to store
  28. objShell.Run "regedit /s pchcert2.reg", true
  29. ' Run Update
  30. objHCU.UpdatePkg strPackage, true
  31. wscript.echo "Done. Healthfest has been registered as a Node Owner." & vbCRLF & "You may now install your Healthfest signed Help Package"