Leaked source code of windows server 2003
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.

39 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 HSSTest
  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 & "\addoemhsstest.cab"
  24. ' Copy files locally
  25. objFSO.CopyFile strSource & "addoemhsstest.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. HSSTest has been registered as a Node Owner." & vbCRLF & "You may now install your HSSTest signed Help Package"