選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

28 行
761B

  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. )
  13. foreach ($path in $components) {
  14. if (-not (Test-Path $path)) {
  15. throw "Component not found: $path"
  16. }
  17. Write-Output "Registering $path"
  18. $proc = Start-Process -FilePath 'regsvr32.exe' -ArgumentList "/s `"$path`"" -PassThru -Wait -WindowStyle Hidden
  19. if ($proc.ExitCode -ne 0) {
  20. throw "regsvr32 failed for $path (exit $($proc.ExitCode))"
  21. }
  22. }
  23. Write-Output "All WSC-MVC components registered."

Powered by TurnKey Linux.