diff --git a/src/Installer/SwitchApps_Library/SwitchApps.Library.csproj b/src/Installer/SwitchApps_Library/SwitchApps.Library.csproj index 9b3cc85..7d5f684 100644 --- a/src/Installer/SwitchApps_Library/SwitchApps.Library.csproj +++ b/src/Installer/SwitchApps_Library/SwitchApps.Library.csproj @@ -33,10 +33,6 @@ 4 - - False - ..\..\..\..\..\..\Program Files (x86)\WiX Toolset v3.11\SDK\Microsoft.Deployment.WindowsInstaller.dll - ..\packages\TaskScheduler.2.9.2\lib\net452\Microsoft.Win32.TaskScheduler.dll diff --git a/src/Installer/_scripts/_helpers.ps1 b/src/Installer/_scripts/_helpers.ps1 index 61ac03f..7166022 100644 --- a/src/Installer/_scripts/_helpers.ps1 +++ b/src/Installer/_scripts/_helpers.ps1 @@ -253,12 +253,26 @@ function RunVS2022 { Write-Output 'Run the solution in VS 2022...' $proc = Start-Process -FilePath $devenvFile -ArgumentList ("/runexit $solutionFile") -PassThru $timeoutReached = $null - $proc | Wait-Process -Timeout 60 -ErrorAction SilentlyContinue -ErrorVariable timeoutReached - if ($timeoutReached) { - # Terminate the process: - Write-Output "Terminate the VS 2022 process..." - $proc | Stop-Process - } + # Send "enter" keystrokes to the VS 2022 window: + $wshell = New-Object -ComObject wscript.shell + # Wait until activating the target process succeeds. + # Note: You may want to implement a timeout here. + Start-Sleep -Seconds 30 + Write-Output "Sending enter to the VS 2022 window" + $wshell.SendKeys('{ENTER}') + Start-Sleep -Seconds 20 + # Write-Output "Sending enter to the VS 2022 window" + # $wshell.SendKeys('{ENTER}') + # Start-Sleep -Seconds 10 + $proc | Stop-Process + # $proc | Wait-Process -Timeout 60 -ErrorAction SilentlyContinue -ErrorVariable timeoutReached + # if ($timeoutReached) { + # # Terminate the process: + # Write-Output "Terminate the VS 2022 process..." + # $proc | Stop-Process + # } + cd $installerDir + ls } # Enums: