crc
crc copied to clipboard
[Windows] Try to find a better workaround instead flashing the powershell windows during crc setup
With https://github.com/code-ready/crc/pull/3088 crc daemon
is started using task schedular but as of now when user perform crc setup
then it flash a powershell window for a second because of limitation https://github.com/PowerShell/PowerShell/issues/3028, In this issue there are other workaround is something like using vbs script (which detect as virus as per @anjannath ) and then https://stackoverflow.com/questions/23250505/how-do-i-create-an-executable-from-golang-that-doesnt-open-a-console-window-whe which use go ldflag for not using any console window https://github.com/code-ready/crc/pull/3088#issuecomment-1081414893 . This isssue is to track if there is a better way.
If we run crc daemon
directly, then a console window is always shown. We try to avoid this through the use of powershell: powershell.exe -WindowStyle Hidden -Command %s
, but there is still a console window flashing briefly as described in https://github.com/PowerShell/PowerShell/issues/3028
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, I am experiencing the same with 2.8.0 (I gave up installing the newest version after many fails). I use Windows Terminal and despite the options mentioned by @cfergeau the powershell window (in Windows terminal) opens and keeps running with crc daemon for the whole login session. It is a bit cumbersome to move it every single time to the second virtual desktop and that still doesn't resolve an issue that I can close it accidentally (as it is running as Windows Terminal). Do you have any progress on this?
If the powershell window stays open, it's unexpected and it's a bug. However I don't think it happens on our machines, so I'm not sure how to debug this further. This bug is about a window which is opened for less than 1 second, and automatically closes it self.