Skip to content

Commit

Permalink
Try a fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-iholkin committed Aug 13, 2024
1 parent 44f4abe commit 2fb441c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/Installer/SwitchApps_Library/SwitchApps.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Deployment.WindowsInstaller, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ce35f76fcda82bad, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Program Files (x86)\WiX Toolset v3.11\SDK\Microsoft.Deployment.WindowsInstaller.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.TaskScheduler, Version=2.9.2.0, Culture=neutral, PublicKeyToken=e25603a88b3aa7da, processorArchitecture=MSIL">
<HintPath>..\packages\TaskScheduler.2.9.2\lib\net452\Microsoft.Win32.TaskScheduler.dll</HintPath>
</Reference>
Expand Down
26 changes: 20 additions & 6 deletions src/Installer/_scripts/_helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2fb441c

Please sign in to comment.