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.

23 lines
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.