No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

29 líneas
828B

  1. [CmdletBinding()]
  2. param(
  3. [string]$ProjectRoot
  4. )
  5. if (-not $ProjectRoot) {
  6. $ProjectRoot = Split-Path -Parent $PSScriptRoot
  7. }
  8. $components = @(
  9. (Join-Path $ProjectRoot 'Framework\RequestContext.wsc'),
  10. (Join-Path $ProjectRoot 'Framework\Application.wsc'),
  11. (Join-Path $ProjectRoot 'Controllers\HomeController.wsc'),
  12. (Join-Path $ProjectRoot 'Controllers\SelfTestController.wsc')
  13. )
  14. foreach ($path in $components) {
  15. if (-not (Test-Path $path)) {
  16. throw "Component not found: $path"
  17. }
  18. Write-Output "Registering $path"
  19. $proc = Start-Process -FilePath 'regsvr32.exe' -ArgumentList "/s `"$path`"" -PassThru -Wait -WindowStyle Hidden
  20. if ($proc.ExitCode -ne 0) {
  21. throw "regsvr32 failed for $path (exit $($proc.ExitCode))"
  22. }
  23. }
  24. Write-Output "All WSC-MVC components registered."

Powered by TurnKey Linux.