Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
|
- [CmdletBinding()]
- param(
- [string]$ProjectRoot = (Split-Path -Parent $PSScriptRoot)
- )
-
- $components = @(
- (Join-Path $ProjectRoot 'Framework\Application.wsc'),
- (Join-Path $ProjectRoot 'Controllers\HomeController.wsc')
- )
-
- foreach ($path in $components) {
- if (-not (Test-Path $path)) {
- throw "Component not found: $path"
- }
- Write-Output "Registering $path"
- $proc = Start-Process -FilePath 'regsvr32.exe' -ArgumentList "/s `"$path`"" -PassThru -Wait -WindowStyle Hidden
- if ($proc.ExitCode -ne 0) {
- throw "regsvr32 failed for $path (exit $($proc.ExitCode))"
- }
- }
-
- Write-Output "All WSC-MVC components registered."
|