Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

23 строки
657B

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

Powered by TurnKey Linux.